I am trying to launch a powershell script as a different users by using start-process while running as the system account. Any ideas how I can get around this. param($ID) Set-ExecutionPolicy Unrestricted $username = 'Blah' $password = 'blahblah' $cred
= New-Object System.Management.Automation.PSCredential -ArgumentList @($username,(ConvertTo-SecureString -String $password -AsPlainText -Force)) start-process -FilePath C:\scomscripts\ack_scom_alert.cmd -argumentlist $ID -Credential $cred -wait -passthru
↧