My PowerShell Profile
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Functions
Modules
.gitignore
Microsoft.PowerShell_profile.ps1
README.md

README.md

PSProfile

My PowerShell Profile (Minus some local extras I use on my work machine).

With thanks to:

Install

WARNING

For now, this will wipe your existing user PowerShell profile and module directory, and any customisations or extra Function files you've added since you last downloaded or updated PSProfile. Everything in %USERPROFILE%\Documents\WindowsPowerShell will go.

If in doubt, backup your existing files first!

Instructions

You can download the zip and place the extracted files at %USERPROFILE%\Documents\WindowsPowerShell

Or run the following in a PowerShell prompt.

$InstallFunc = "https://raw.githubusercontent.com/arricc/PSProfile/master/Functions/Install-PSProfile.ps1?rand=" + (Get-Date -Format "O")
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
iex ((New-Object System.Net.WebClient).DownloadString($InstallFunc))
Install-PSProfile

Updating

To update simply run Install-PSProfile if you get an error relating to secure connectivity, try this:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Install-PSProfile

Execution Policy

If when you restart PowerShell you get an error such as:

. : File C:\Users\username\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 cannot be loaded because running
scripts is disabled on this system. For more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:3
+ . 'C:\Users\mark\Documents\WindowsPowerShell\Microsoft.PowerShell_pro ...
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

Then you need to update the Execution Policy on your system to one of the following:

Set-ExecutionPolicy RemoteSigned
Set-ExecutionPolicy Unrestricted
Set-ExecutionPolicy Bypass

If you are unsure what the difference between these 3 policy levels is, check the link in the error message or run:

help about_Execution_Policies

Suggestions/Fixes

Pull requests welcome, as are comments and issues logged to the issue tracker.

If you're more comfortable with email: psprofile@arricc.net.

Or you can connect with me on Twitter @markmcritchie.