PS C:\PS> Get-Alias -name ls CommandType Name Definition ----------- ---- ---------- Alias ls Get-ChildItem PS C:\PS> Get-Alias -name dir CommandType Name Definition ----------- ---- ---------- Alias dir Get-ChildItem PS C:\PS> Get-Alias -name fl CommandType Name Definition ----------- ---- ---------- Alias fl Format-List PS C:\PS> Get-Alias -name ft CommandType Name Definition ----------- ---- ---------- Alias ft Format-Table
PS C:\PS> dir alias: | where {$_.Definition.Startswith("Remove")}
CommandType Name Definition
----------- ---- ----------
Alias del Remove-Item
Alias erase Remove-Item
Alias rbp Remove-PSBreakpoint
Alias rd Remove-Item
Alias rdr Remove-PSDrive
Alias ri Remove-Item
Alias rjb Remove-Job
Alias rm Remove-Item
Alias rmdir Remove-Item
Alias rmo Remove-Module
Alias rp Remove-ItemProperty
Alias rsn Remove-PSSession
Alias rsnp Remove-PSSnapin
Alias rv Remove-Variable
Alias rwmi Remove-WMIObject
PS C:\PS> ls alias: | Group-Object definition | sort -Descending Count
Count Name Group
----- ---- -----
6 Remove-Item {del, erase, rd, ri...}
3 Set-Location {cd, chdir, sl}
3 Get-History {ghy, h, history}
3 Get-ChildItem {dir, gci, ls}
3 Get-Content {cat, gc, type}
3 Move-Item {mi, move, mv}
3 Copy-Item {copy, cp, cpi}
2 Start-Process {saps, start}
2 Set-Variable {set, sv}
2 Write-Output {echo, write}
2 Get-Process {gps, ps}
2 Invoke-History {ihy, r}
2 New-PSDrive {mount, ndr}
2 Stop-Process {kill, spps}
2 Rename-Item {ren, rni}
2 Get-Location {gl, pwd}
2 Compare-Object {compare, diff}
2 Where-Object {?, where}
2 ForEach-Object {%, foreach}
2 Clear-Host {clear, cls}
1 Out-Host {oh}
1 New-PSSession {nsn}
1 New-Variable {nv}
1 Out-GridView {ogv}
1 Pop-Location {popd}
1 Tee-Object {tee}
1 Remove-PSBreakpoint {rbp}
1 Receive-Job {rcjb}
1 Push-Location {pushd}
1 mkdir {md}
1 Measure-Object {measure}
1 help {man}
1 Remove-PSSnapin {rsnp}
1 Out-Printer {lp}
1 New-Item {ni}
1 New-Module {nmo}
1 New-Alias {nal}
1 Move-ItemProperty {mp}
1 Wait-Job {wjb}
1 Remove-PSDrive {rdr}
1 Start-Service {sasv}
1 Set-PSBreakpoint {sbp}
1 Set-ItemProperty {sp}
1 Start-Job {sajb}
1 Set-Alias {sal}
1 Start-Sleep {sleep}
1 Set-Item {si}
1 Select-Object {select}
1 Set-Content {sc}
1 Sort-Object {sort}
1 Remove-WMIObject {rwmi}
1 Remove-Module {rmo}
1 Rename-ItemProperty {rnp}
1 Stop-Service {spsv}
1 Set-WMIInstance {swmi}
1 Remove-Job {rjb}
1 Remove-Variable {rv}
1 Resolve-Path {rvpa}
1 Stop-Job {spjb}
1 Remove-ItemProperty {rp}
1 Remove-PSSession {rsn}
1 Exit-PSSession {exsn}
1 Format-Custom {fc}
1 Enter-PSSession {etsn}
1 Export-Csv {epcsv}
1 Export-PSSession {epsn}
1 Format-List {fl}
1 Get-PSBreakpoint {gbp}
1 Get-Command {gcm}
1 Get-Alias {gal}
1 Format-Table {ft}
1 Format-Wide {fw}
1 Export-Alias {epal}
1 Clear-History {clhy}
1 Clear-Item {cli}
1 Clear-Content {clc}
1 Add-Content {ac}
1 Add-PSSnapIn {asnp}
1 Clear-ItemProperty {clp}
1 Disable-PSBreakpoint {dbp}
1 Enable-PSBreakpoint {ebp}
1 Convert-Path {cvpa}
1 Clear-Variable {clv}
1 Copy-ItemProperty {cpp}
1 Invoke-Expression {iex}
1 Invoke-Item {ii}
1 Invoke-Command {icm}
1 Get-Variable {gv}
1 Get-WmiObject {gwmi}
1 Import-Alias {ipal}
1 powershell_ise.exe {ise}
1 Invoke-WMIMethod {iwmi}
1 Import-PSSession {ipsn}
1 Import-Csv {ipcsv}
1 Import-Module {ipmo}
1 Get-Unique {gu}
1 Get-Job {gjb}
1 Get-Member {gm}
1 Get-Item {gi}
1 Get-PSCallStack {gcs}
1 Get-PSDrive {gdr}
1 Get-Module {gmo}
1 Get-PSSnapIn {gsnp}
1 Get-Service {gsv}
1 Get-PSSession {gsn}
1 Get-ItemProperty {gp}
1 Group-Object {group}
PS C:\PS> Set-Alias -Name Edit -Value notepad PS C:\PS> Edit PS C:\PS> $alias:Edit notepad
PS C:\PS> Import-Alias alias.ps1 Import-Alias : Alias not allowed because an alias with the name 'ac' already exists. At line:1 char:13 + Import-Alias <<<< alias.ps1 + CategoryInfo : ResourceExists: (ac:String) [Import-Alias], SessionStateException + FullyQualifiedErrorId : AliasAlreadyExists,Microsoft.PowerShell.Commands.ImportAliasCommand
PS C:\PS> Export-Alias alias.ps1 PS C:\PS> Import-Alias -Force alias.ps1
gas c:\scripts\sqlscript.ps1
get-authenticodesignature c:\scripts\sqlscript.ps1
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有