Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »


Enable the script to run

link

Set-ExecutionPolicy Unrestricted

set-ExecutionPolicy
PS C:\windows\system32> Get-ExecutionPolicy
Restricted
PS C:\windows\system32> Set-ExecutionPolicy Unrestricted

Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic at
https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): yes
PS C:\windows\system32> Get-ExecutionPolicy
Unrestricted
PS C:\windows\system32>
Hello World
create

create a .ps1 file

>>>> write-host "hello world"


use ISE

run

> "hello world.ps1"

or

>& '.\hello world.ps1'





























  • No labels