How to run ps1 scripts

PowerShell scripts are text files with ".ps1" extensions that contain PowerShell commands. Starting with Windows Server 2008, PowerShell is built into the OS. For earlier OS versions, you will need to download PowerShell at Microsoft PowerShell Site and install it.

To run ps1 scripts, you first need to enable scripts by running:

Set-ExecutionPolicy RemoteSigned

Otherwise, you will get this error message:

File <script> cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details.

The most common way to run PowerShell scripts is from Windows PowerShell command prompt. You must specify a path to the script to run it. If the script is in your current folder, then you can run it with:


If the script is in another folder, you need specify the full path:


    How to enable PowerShell scripts

    1. Open a PowerShell command prompt and type Set-ExecutionPolicy RemoteSigned


    2. You will be asked if you are sure


    3. Select ‘Y’ and hit <enter>


    You are now setup to run scripts on your machine. Note that if you use a 64 bit machine then you need to set the policy for both x86 and x64 PowerShell. If at any time you want to switch back to not allowing scripts, run “Set-ExecutionPolicy Restricted”.

    2 thoughts on “How to run ps1 scripts”

    1. Hi Mike, first thanks for the work aorund , still dont understand why Microsoft didnt change it , because your are able to select domain local security groups when grant send-as permissions.But i got a small other issue with exchange 2010, i am using the domain local security group to set grant permissions to a shared mailbox. for a unknow reason the attribute msExchDelegateListLink of the shared mailbox does not get filled in. so users who are member of that group does not get the shared mailbox automatically in their outlook 2010. if i add the permissions per user the attribute get filledin within a few minutes and trhe users sees the shared mailbox in their outlook after 3 min. any help is greatley appriciated

    Leave a Reply

    Your email address will not be published.