Article ID: 2411920 - View products that this article applies to.
When you try to run a script in Microsoft Azure Active Directory Module for Windows PowerShell, you receive one of the following error messages:
File C:\my_script.ps1 cannot be loaded. The execution of scripts is disabled on this system. Please see "Get-Help about_signing" for more details.
File C:\Desktop\myscript.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
File C:\my_script.ps1 cannot be loaded. The file C:\my_script.ps1 is not digitally signed. The script will not execute on the system. For more information, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
This issue may occur if the execution policy is set to Restricted. Certain Windows PowerShell cmdlets can't run if the policy is too restricted.
To resolve this issue, follow these steps:
To help deliver a more secure command-line administration experience, Windows PowerShell uses "execution policies" to control how Windows PowerShell can be used. Execution policies define the restrictions under which Windows PowerShell loads files for execution and configuration. By default, Windows PowerShell runs in the Restricted execution policy. This mode is its most secure mode in which Windows PowerShell operates as an interactive shell only.
The four execution policies are as follows:
Still need help? Go to the Office 365 Community
(http://community.office365.com/)website or the Azure Active Directory Forums
Article ID: 2411920 - Last Review: December 12, 2014 - Revision: 27.0
Contact us for more help