Headbanging_coder
Headbanging_coder

Reputation: 51

Powershell process as administrator

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

Answers (0)

Related Questions