Robb Hill
asked on
Powershell and PSExec = Password failure
I have a powershell script...with a call to psexec inside of it.
So technically both tools have different character rules for a password.
I have a strange password that is as follows
Gy^KZwU.H6>{
The powershell and included psexc is as follows:
Please help. I tried inclosing the ^ in '' and the { in '' and still failed essentially causing that user to lock out as this script loops more than 3 times.
So technically both tools have different character rules for a password.
I have a strange password that is as follows
Gy^KZwU.H6>{
The powershell and included psexc is as follows:
$Processes = Get-WmiObject -Class Win32_Process -ComputerName $Computer | ? {$_.name -like "$processname*"}
foreach ($process in $processes) {
$commandval = $process.commandline
$process2 = [WMICLASS]"\\$Computer\ROOT\CIMV2:win32_process"
$process.Terminate()
& "C:\PSTools\psexec.exe" -accepteula -i 2 "\\$Computer" -u "domain\user" -p "Gy^KZwU.H6>{" "D:\filepath\program.bat"
}
Please help. I tried inclosing the ^ in '' and the { in '' and still failed essentially causing that user to lock out as this script loops more than 3 times.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I did just have to change the password......thanks for the input everyone
ASKER
Thank you both!
ASKER