Take Command tab as PowerShell

Jul 12, 2008
274
0
Las Vegas, NV
I have one of my tabs on Take Command set to open a PowerShell instance. If my PS tab starts with the following commands

Command=%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe
Directory=C:\
RunAs=

What can I do/modify/add to have PowerShell running with Admin rights?
 
Jul 12, 2008
274
0
Las Vegas, NV
It seemingly didn't work. I get the following error with the tab:

Set-ExecutionPolicy : Access to the registry key
'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell' is denied. To change the
execution policy for the default (LocalMachine) scope, start Windows PowerShell with the "Run as administrator"
option. To change the execution policy for the current user, run "Set-ExecutionPolicy -Scope CurrentUser".
At C:\Users\OL Man\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:1 char:1
+ Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (:) [Set-ExecutionPolicy], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetExecutionPolicyCo
mmand
 
Jul 12, 2008
274
0
Las Vegas, NV
After opening the window (getting no error) I ran the following

([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(`
>>
>> [Security.Principal.WindowsBuiltInRole] "Administrator")
False
PS C:\>