Hello,
PS C:\Windows\system32> Get-ExecutionPolicy -List
Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser Bypass
LocalMachine RemoteSigned
I got an error:
PS C:\Windows\system32> Get-CMAntimalwarePolicy
Get-CMAntimalwarePolicy : This command cannot be run from the current drive. To run this command you must first connect to a Configuration
Manager drive.
At line:1 char:1
- Get-CMAntimalwarePolicy
- ~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : DeviceError: (Microsoft.Confi...timalwarePolicy:GetAntimalwarePolicy) [Get-CMAntimalwarePolicy], InvalidOpera
tionException
- FullyQualifiedErrorId : CommandCannotExecuteFromCurrentDrive,Microsoft.ConfigurationManagement.PowerShell.Cmdlets.EP.GetAntimalwarePo
licy
So I did the connection:

I checked the executionpolicy:
PS C:\Windows\system32> get-executionpolicy
AllSigned
PS C:\Windows\system32> Set-ExecutionPolicy RemoteSigned
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 line:1 char:1
- Set-ExecutionPolicy RemoteSigned
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : PermissionDenied: (:) [Set-ExecutionPolicy], UnauthorizedAccessException
- FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetExecutionPolicyCommand
How do I get the "Run As Administrator" in the CM Console?
Thanks,
Dom