I'm trying to script some DNS Atype and PTRtype data entries. I've thoroughly studied the MSDN Library createInstanceFromPropertydata method and queried DNS for pointer and A records for precise examples and every time I run this script, I recieve a Generic Failure error on the first instance...
I tried this and I received an error message. Is there a way to go from 6 elements to 7 and back to 6 again? Will redimming the array work in this instance?
[code]
Const ForReading = 1
Set oFSO = CreateObject("Scripting.FileSystemObject")sInputFile = "c:\Userupdatetest.csv"
Set oFile =...
Thanks PHV, that worked perfectly. Is it possible to remove comma strings after the 6th comma? For example, my last column (title)contains comma's and this screws with split function. I looked into doing this in excel however, I don't want to load excel on my batch server.
Thank you in advance.
Think I'm on the right track here. I found the filter function and have been playing around with it some. The problem I'm having now is, when there is a NULL value in the sLogon portion of the array, it fills in with the sCompany and on down the line. I then receive an error message saying...
I'm reading a CSV file into an array however, some of the values in the csv file can be either NULL or - values and they can show up randomly in any one of the positions. I don't want these values populated within the properties of my user's accounts. Is there a way to filter these values out...
I'm trying to use wget to strip a jpeg camera image from an external web page every 30 seconds and I want do this 10 hours per day. I know wget will place the image in the same folder it runs from however, I want to rename the images 1 to 1200 and place them in a folder with the current day's...
Mark,
You're correct...sorry again for the confusion. I'm in the dark ages and still using Windows XP 32-bit if you can believe it so UAC isnt my issue.
I will incorporate the new code in my script.
Thank you very much for your time!
Mark,
Thanks for the code. What does that do to fix my problem when typing ping -t www.yahoo.com in a Powershell window and not being able to Ctrl-C to stop the pings? Is your code something I have to do in my powershell profile? I'm not sure what you are telling me.
It's funny how you think you are being clear and when you look back at your question, it wasn't clear at all.
I'm setting up some continuous ping scripts within Powershell and as I try to stop the pings I'm not able to use any of the shortcuts I've used in the past i.e., Ctrl-C (main one)...
I know how you feel Mr, I'm basically forcing myself to learn Powershell. Don Jones is coming out with a new book pretty soon that should make it easier.
I worked on this all day but only after I posted asking for help did I realize one more thing and I figured it out. Just being around you guys makes me smarter =)
#
function Get-DistinguishedName {
#
Param($username)
#
$ads = New-Object System.DirectoryServices.DirectorySearcher([ADSI]'')...
I see the first problem already, the function has to be defined first before you can call on it. I did try to reverse the code but had no luck with that too.
Markdmac sent me this really nice function that converts the sAMAccountName into a Distinguished name. I have a text file with 600 or so usernames that I would like to feed into this function using a foreach loop and send the output to the screen. I am having no luck finding examples on the...
That worked, thanks EB...I guess the command really needs to be within the ( ) and not within the " Since objserver was outside the quotes it didn't look right.
I create a lot of websites in my environment and would like to use a script to run my setspn commands. I can do it like this however, it defeats the purpose unless I can inject variables with input boxes or arrays.
objShell.Run("%COMSPEC% /k Echo Y| setspn.exe -A http/testsite server1", 1...
Thanks for the quick response. I'm trying to do 2 things really...I'm attaching to a folder using the getfolder method and iterating through each file in the folder.
Set objFolder = objFSO.GetFolder(strCurrentFilePath)
Set colFiles = objFolder.Files
For Each objFile In colFiles
so something...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.