Hi All,
I've written a powershell script that takes arguments. The PS script is executed and arguments are passed from a VBScript.
I am having problems working out the correct format of the command line. I am nearly there, but at the moment it returns:
The correct OU would be "xxx.xxxxx.co.uk/Company Name/All Users"
The code that executes is:
.
All though I've put in the quotes, they don't seem to work.
I've read the powershell /? help but I am still confused.
If anybody could point me in the right direction, I'd be very grateful.
Many thanks
Woter
I've written a powershell script that takes arguments. The PS script is executed and arguments are passed from a VBScript.
I am having problems working out the correct format of the command line. I am nearly there, but at the moment it returns:
Code:
Organizational unit "xxx.xxxxx.co.uk/Company" was not found. Please make sure you have typed it correctly.
The correct OU would be "xxx.xxxxx.co.uk/Company Name/All Users"
The code that executes is:
Code:
strCreateUser = strAlias & " " & chr(34) & strOU & Chr(34) & " " & strFN & " " & strLN & " " & chr(34) & strDB & Chr(34)
strCMD="Powershell -noexit -command " & chr(34) & "& {" &oFile.ShortPath & " " & strCreateUser & "}" & chr(34)
objShell.run "Powershell -noexit -command " & chr(34) & "&{" &oFile.ShortPath & " " & strCreateUser & "}" & chr(34)
All though I've put in the quotes, they don't seem to work.
I've read the powershell /? help but I am still confused.
If anybody could point me in the right direction, I'd be very grateful.
Many thanks
Woter