Wednesday, December 3, 2008

profile load issue solved

File C:\Users\Gaurav\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details.
At line:1 char:2
+ .  <<<< ‘C:\Users\Gaurav\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1′
This is because PowerShell does not allow the execution of scripts by default. To fix this open PowerShell in Admin mode and set the execution policy to unrestricted by running the following command:

Set-ExecutionPolicy remotesigned
 
Notepad $profile 
Add-PSSnapin Quest.ActiveRoles.ADManagement
Set-ExecutionPolicy remotesigned

No comments: