Due to various new security policies, we need to be able to run various tasks as an assigned uid. To assist in this, a common menu system was developed. One of the functions in the script is:
$credential = user_credential
$cmd = "C:\windows\system32\mmc.exe"
$args = "C:\Windows\System32\compmgmt.msc"
Start-Process -FilePath $cmd -ArgumentList $args -Credential $credential
Error received:
Start-Process : This command cannot be run due to the error: The requested operation requires elevation.
t C:\webeng\webeng.ps1:131 char:5
Start-Process -FilePath $cmd -ArgumentList $args -Credential $credential
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
The error seems to indicate that the PS script requires elevated privs but I am already running as Administrator.
What could I possibly be missing here?