Fundamental concepts for PowerShell scripting
Set ExecutionPolicy on the Server
No requirements; all scripts allowed
All local scripts allowed; only signed remote scripts
All scripts need to be signed
No scripts allowed (Scripts won't run.)
You can set PowerShell's execution policy by using the following cmdlet:
e.g. Set-ExecutionPolicy Unrestricted
A PowerShell script is really nothing more than a simple text file.
The file contains a series of PowerShell commands, with each command appearing on a separate line.
For the text file to be treated as a PowerShell script, its filename needs to use the .PS1 extension.