1. エイリアス一覧取得
1 2 3 4 5 6 7 8 9 10 |
PS > Get-Alias CommandType Name Version Source ----------- ---- ------- ------ Alias % -> ForEach-Object Alias ? -> Where-Object Alias ac -> Add-Content Alias asnp -> Add-PSSnapin Alias cat -> Get-Content ... |
2. あるコマンドレットに紐づいたエイリアスの取得
1 |
PS > Get-Alias | Where-Object { $_.Definition -eq "Get-ChildItem" } |
1 2 3 4 5 6 7 |
PS > gal | ? { $_.Definition -eq "Get-ChildItem" } CommandType Name Version Source ----------- ---- ------- ------ Alias dir -> Get-ChildItem Alias gci -> Get-ChildItem Alias ls -> Get-ChildItem |