Tuesday, May 24, 2016

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

No comments:

Post a Comment