If you hard code the runas command instead of using variables, does it work? I'm thinking it's still a quotation problem, but it would be nice to make sure.
 Code:
$cmd = '"\\server\netlogon\runnas.exe" user:domain\helpdesk "\\server\netlogon\programs\client.bat" /pass:password'

Also, does it work if you just type the command into the command prompt?


Edited by ShaneEP (2017-05-11 05:49 PM)