Reputation: 51
I'm using following code to execute some powershell commands remotely:
Invoke-WmiMethod -ComputerName $ComputerHost -Credential $cred -Class Win32_Process -Name Create -ArgumentList "powershell -command $MyPowershellCommand" -ErrorAction Stop
My user has all needed permissions. I need to start powershell process with "Run as Administrator" argument. Could someone tell me what I need to add in ArgumentList block to achieve these?
Upvotes: 0
Views: 51