Jump to content

Recommended Posts

Posted

Hi All,

I am trying to create a script that allows a machine name to entered into an Inputbox and that input use in a comspec line....

I have not been successfuly. I have put it in single quotes, double, etc. Not sure how to accomplish this.

Look through help file, this seemed to specific.

THANKS!

$answer = InputBox("Bitlocker Recover Password Query", "Enter the Machine Name", "", "", _

-1, -1, 0, 0)

RunWait(@ComSpec & " /k " & 'dsquery * "CN=$answer,OU=Workstations,OU=Practice Office,DC=us,DC=Company,DC=com" -scope subtree -attr msFVE-RecoveryPassword',"", @SW_MAXIMIZE)

Posted

RunWait(@ComSpec & " /k " & 'dsquery * "CN=" & $answer & ",OU=Workstations,OU=Practice Office,DC=us,DC=Company,DC=com" -scope subtree -attr msFVE-RecoveryPassword',"", @SW_MAXIMIZE)

Hope It Helps.

Thanks.

Swift

Posted

RunWait(@ComSpec & " /k " & 'dsquery * "CN=" & $answer & ",OU=Workstations,OU=Practice Office,DC=us,DC=Company,DC=com" -scope subtree -attr msFVE-RecoveryPassword',"", @SW_MAXIMIZE)

Hope It Helps.

Thanks.

Swift

SWIFT!!!

Thanks a lot... that was close.....had to surround the variable with single quotes as you cannot have doubles within double next to each other.....

THANKS!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...