Hi All,
Usually in an Active Directory environment,the executions of scripts especially power shell scripts can be controlled using group policy.
For a normal user the execution policy will be Restricted by default, for security reasons. This can be changed by changing the values in registry as follows
In Restricted : Can’t run any scripts
In All Signed / Remote Signed : either self signed or trusted certificate required
In Unrestricted: no restriction in running any scripts.
Just copy paste the below lines in a text file and save it as extension
".reg"[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell]
“Path”=”C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe”
“ExecutionPolicy”=”RemoteSigned”
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell]“Path”=”C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe”"ExecutionPolicy”=”RemoteSigned”
Thanks