Created
June 10, 2015 15:28
-
-
Save luchosrock/f05bf7d7d87624277696 to your computer and use it in GitHub Desktop.
How to enable execution of user defined powershell scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Create file with instructions and save as script.ps1 | |
Write-Host "Hello, World!" | |
# Open cmder or CMD as Administrator (right button click > Open as administrator) | |
λ powershell | |
Windows PowerShell | |
Copyright (C) 2009 Microsoft Corporation. Reservados todos los derechos. | |
PS> Set-ExecutionPolicy RemoteSigned | |
#Close program | |
#Open a new instance of powershell (same as before) and navigate to the script.ps1 folder | |
PS> & ".\script.ps1" | |
Hello, World! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment