You can specify the -Credential
parameter. It’s expecting a variable contains the credential of the user you’d like to run as.
$MyUser = Get-UAVariable -Name 'MyUser'
Invoke-UAScript -Credential $MyUser -Script "MyScript.ps1"
You can specify the -Credential
parameter. It’s expecting a variable contains the credential of the user you’d like to run as.
$MyUser = Get-UAVariable -Name 'MyUser'
Invoke-UAScript -Credential $MyUser -Script "MyScript.ps1"