Posted on Leave a comment

Execute Powershell scripts at command line

Powershell’s default setting does not allow for execution of scripts

C:>powershell                           # enter powershell
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.

PS C:> Get-ExecutionPolicy              # check what the rights are
Restricted
PS C:> Set-ExecutionPolicy RemoteSigned # reset the rights
PS C:> Get-ExecutionPolicy              # make sure the change took

Now can execute scripts at command line
Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.