Powershell Environment Configuration
Overview
Any issues and solutions that have been encountered configuring the Powershell environment to run scripts.
Script permissions
Script permissions on the local filesystem
By default powershell scripts (.ps1) won't run. Permission for this doesn't allow for the local machine to execute powershell scripts.
[SCRIPT_NAME] : File [FULL_SCRIPT_PATH] cannot be loaded. The file [FULL_SCRIPT_PATH] is not digitally signed.
TODO: Document how to update the environment to allow this. I don't remember the details of how it was done right now.
Allowing scripts to run from UNC paths


By default powershell scripts can't be run from UNC paths (e.g. \\mylocalserver\path\to\script.ps1):
[SCRIPT_NAME] : File [FULL_SCRIPT_PATH] cannot be loaded. The file [FULL_SCRIPT_PATH] is not digitally signed.
- Control Panel > Network and Internet > Internet Options > Security tab
- Select a zone to view or change security settings: Local Intranet
- Sites button
- Uncheck "Automatically detect intranet network"
- Check "Include all local (intranet) sites not listed in other zones"
- Check "Include all network paths (UNC)"
Aliases
There is a file that controls the current user's powershell environment. Scripts and script aliases are stored in this file.
TODO: I don't remember offhand where this file is located. Document its location.