How to Creating Alias in Powershell scripting | Set-Alias or New-Alias

preview_player
Показать описание
How to Creating Alias in Powershell scripting
Set-Alias or New-Alias
New-Alias -Name "List" Get-ChildItem
New-Alias -Name "C" -Value Get-ChildItem -Description "quick gci alias" -Option ReadOnly
Get-Alias -Name "C" | Format-List *

The New-Alias cmdlet creates a new alias in the current PowerShell session. Aliases created by using New-Alias are not saved after you exit the session or close PowerShell. You can use the Export-Alias cmdlet to save your alias information to a file. You can later use Import-Alias to retrieve that saved alias information.

How do I create an alias in PowerShell?
What is the alias command in PowerShell?
How do I assign an alias?
#Powershell #PaddyMaddy #windowsPowershell
Рекомендации по теме
Комментарии
Автор

How to Creating Alias in Powershell scripting | Set-Alias or New-Alias

PaddyMaddy
Автор

How can I set an alias for a property? For instance, Get-Aduser -Filter {SamAccountName -like "*dson*"} | Properties Name, msDS-cloudExtensionAttribute1 | Select Name, Here, instead of msDS-cloudExtensionAttribute1, I want to set an alias. Could you reply me, how to set this alias?

Jhadeswar
join shbcf.ru