Powershell Bits & Bobs

Autocomplete

How to add bash-style autocomplete to powershell. Just add the following to your profile1 script.

Set-PSReadlineKeyHandler -Key Tab -Function Complete

Execution Policy

When setting up a profile.ps1 you will most likely be unable to run any of the scripts you have written. By setting the execution policy to remote unsigned it stops scripts being run via third parties.

set-executionpolicy remotesigned

What Version

The version of powershell you are currently running is in the versiontable


$PSVersionTable.PSVersion

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.