PowerTip: Find PowerShell Canonical Aliases

Doctor Scripto

Summary: Find Windows PowerShell aliases that are read-only and available in all scopes.

Hey, Scripting Guy! Question How can I produce a list of Windows PowerShell aliases that are read-only and are available in
           all Windows PowerShell scopes?

Hey, Scripting Guy! Answer Use the Get-Alias cmdlet to produce a list of aliases, filter on aliases that have an option of read-only,
           and select the name, definition, and options:

Get-Alias | Where options -match 'readonly' | select name, definition, options

0 comments

Discussion is closed.

Feedback usabilla icon