Tab Completion in PowerShell

Command completion when working at the PowerShell prompt.
The [TAB] key can be used to automatically complete cmdlets, Filenames, Variable names and Parameters:

Examples -


PS C:\> get-c [tab] [tab] [tab]...


PS C:\> dir "C:\WINDOWS\system32\ [tab] [tab] [tab]...
PS C:\> Get-Content -path C:\ [tab] [tab] [tab]...

Note this will not complete any folder names which have the 'hidden' attribute set


PS C:\> $t [tab] => $true

PS C:\> $m [tab] [tab] [tab]...


PS C:\> gci -f [tab] [tab] [tab]...

PS C:\> Get-Content -Cr [tab]...

Even more flexible and complex tab completions can be added by installing the PowerTab function, this is particularly handy for browsing .NET namesspaces.

“Everything you need you already have. You are complete right now, you are a whole, total person, not an apprentice person on the way to someplace else” ~ Wayne Dyer


Comments and Tab-Expansion
Get-Command - Get basic information about cmdlets

Copyright © 1999-2017
Some rights reserved