From 3195a433af000f022bc2116c5df00880c495d37e Mon Sep 17 00:00:00 2001 From: Jason Shirk Date: Sat, 28 Oct 2017 22:35:45 -0700 Subject: [PATCH 1/2] Remove AllScope from most default aliases To speed up scope creation, I removed AllScope from most default aliases. This results in a 15-20% speedup for: function foo {} for ($i = 0; $i -lt 100kb; $i++) { & { foo } } I left AllScope of a few frequently used aliases because it does make command lookup faster. If we introduce something like dynamic sites for command lookup, then we could probably remove the rest of the AllScope aliases. This is a low risk breaking change. One can ask for aliases at a particular scope: Get-Alias -Scope 1 nsn This could now fail if the scope number doesn't correspond to global scope. --- .../engine/InitialSessionState.cs | 457 ++++++------------ 1 file changed, 156 insertions(+), 301 deletions(-) diff --git a/src/System.Management.Automation/engine/InitialSessionState.cs b/src/System.Management.Automation/engine/InitialSessionState.cs index 73bf7659a5b..6b57a8318de 100644 --- a/src/System.Management.Automation/engine/InitialSessionState.cs +++ b/src/System.Management.Automation/engine/InitialSessionState.cs @@ -4552,326 +4552,181 @@ internal static SessionStateAliasEntry[] BuiltInAliases { get { + // Too many AllScope entries hurts performance because an entry is + // created in each new scope, so we limit the use of AllScope to the + // most commonly used commands - primarily so command lookup is faster, + // though if we speed up command lookup significantly, then removing + // AllScope for all of these aliases makes sense. + + const ScopedItemOptions AllScope = ScopedItemOptions.AllScope; + const ScopedItemOptions ReadOnly_AllScope = ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope; + const ScopedItemOptions ReadOnly = ScopedItemOptions.ReadOnly; + return new SessionStateAliasEntry[] { - new SessionStateAliasEntry("foreach", - "ForEach-Object", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("%", - "ForEach-Object", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("where", - "Where-Object", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("?", - "Where-Object", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("clc", - "Clear-Content", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("cli", - "Clear-Item", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("clp", - "Clear-ItemProperty", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("clv", - "Clear-Variable", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("cpi", - "Copy-Item", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("cvpa", - "Convert-Path", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("dbp", - "Disable-PSBreakpoint", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("ebp", - "Enable-PSBreakpoint", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("epal", - "Export-Alias", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("epcsv", - "Export-Csv", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("fl", - "Format-List", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("ft", - "Format-Table", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("fw", - "Format-Wide", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("gal", - "Get-Alias", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("gbp", - "Get-PSBreakpoint", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("gc", - "Get-Content", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("gci", - "Get-ChildItem", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("gcm", - "Get-Command", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("gdr", - "Get-PSDrive", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("gcs", - "Get-PSCallStack", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("ghy", - "Get-History", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("gi", - "Get-Item", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("gl", - "Get-Location", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("gm", - "Get-Member", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("gmo", - "Get-Module", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("gp", - "Get-ItemProperty", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("gpv", - "Get-ItemPropertyValue", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("gps", - "Get-Process", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("group", - "Group-Object", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("gu", - "Get-Unique", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("gv", - "Get-Variable", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("iex", - "Invoke-Expression", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("ihy", - "Invoke-History", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("ii", - "Invoke-Item", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("ipmo", - "Import-Module", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("ipal", - "Import-Alias", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("ipcsv", - "Import-Csv", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("measure", - "Measure-Object", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("mi", - "Move-Item", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("mp", - "Move-ItemProperty", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("nal", - "New-Alias", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("ndr", - "New-PSDrive", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("ni", - "New-Item", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("nv", - "New-Variable", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("nmo", - "New-Module", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("oh", - "Out-Host", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("rbp", - "Remove-PSBreakpoint", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("rdr", - "Remove-PSDrive", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("ri", - "Remove-Item", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("rni", - "Rename-Item", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("rnp", - "Rename-ItemProperty", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("rp", - "Remove-ItemProperty", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("rmo", - "Remove-Module", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("rv", - "Remove-Variable", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("rvpa", - "Resolve-Path", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("sal", - "Set-Alias", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("sbp", - "Set-PSBreakpoint", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("sc", - "Set-Content", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - // this conflicts with sd.exe, and makes msh unusable by dev. - // new SessionStateAliasEntry("sd", - // "Set-Date", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.Constant | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("select", - "Select-Object", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("si", - "Set-Item", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("sl", - "Set-Location", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("sp", - "Set-ItemProperty", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("saps", - "Start-Process", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("spps", - "Stop-Process", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("sv", - "Set-Variable", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), + new SessionStateAliasEntry("foreach", "ForEach-Object", "", ReadOnly_AllScope), + new SessionStateAliasEntry("%", "ForEach-Object", "", ReadOnly_AllScope), + new SessionStateAliasEntry("where", "Where-Object", "", ReadOnly_AllScope), + new SessionStateAliasEntry("?", "Where-Object", "", ReadOnly_AllScope), + new SessionStateAliasEntry("clc", "Clear-Content", "", ReadOnly), + new SessionStateAliasEntry("cli", "Clear-Item", "", ReadOnly), + new SessionStateAliasEntry("clp", "Clear-ItemProperty", "", ReadOnly), + new SessionStateAliasEntry("clv", "Clear-Variable", "", ReadOnly), + new SessionStateAliasEntry("cpi", "Copy-Item", "", ReadOnly), + new SessionStateAliasEntry("cvpa", "Convert-Path", "", ReadOnly), + new SessionStateAliasEntry("dbp", "Disable-PSBreakpoint", "", ReadOnly), + new SessionStateAliasEntry("ebp", "Enable-PSBreakpoint", "", ReadOnly), + new SessionStateAliasEntry("epal", "Export-Alias", "", ReadOnly), + new SessionStateAliasEntry("epcsv", "Export-Csv", "", ReadOnly), + new SessionStateAliasEntry("fl", "Format-List", "", ReadOnly), + new SessionStateAliasEntry("ft", "Format-Table", "", ReadOnly), + new SessionStateAliasEntry("fw", "Format-Wide", "", ReadOnly), + new SessionStateAliasEntry("gal", "Get-Alias", "", ReadOnly), + new SessionStateAliasEntry("gbp", "Get-PSBreakpoint", "", ReadOnly), + new SessionStateAliasEntry("gc", "Get-Content", "", ReadOnly), + new SessionStateAliasEntry("gci", "Get-ChildItem", "", ReadOnly), + new SessionStateAliasEntry("gcm", "Get-Command", "", ReadOnly), + new SessionStateAliasEntry("gdr", "Get-PSDrive", "", ReadOnly), + new SessionStateAliasEntry("gcs", "Get-PSCallStack", "", ReadOnly), + new SessionStateAliasEntry("ghy", "Get-History", "", ReadOnly), + new SessionStateAliasEntry("gi", "Get-Item", "", ReadOnly), + new SessionStateAliasEntry("gl", "Get-Location", "", ReadOnly), + new SessionStateAliasEntry("gm", "Get-Member", "", ReadOnly), + new SessionStateAliasEntry("gmo", "Get-Module", "", ReadOnly), + new SessionStateAliasEntry("gp", "Get-ItemProperty", "", ReadOnly), + new SessionStateAliasEntry("gpv", "Get-ItemPropertyValue", "",ReadOnly), + new SessionStateAliasEntry("gps", "Get-Process", "", ReadOnly), + new SessionStateAliasEntry("group", "Group-Object", "", ReadOnly), + new SessionStateAliasEntry("gu", "Get-Unique", "", ReadOnly), + new SessionStateAliasEntry("gv", "Get-Variable", "", ReadOnly), + new SessionStateAliasEntry("iex", "Invoke-Expression", "", ReadOnly), + new SessionStateAliasEntry("ihy", "Invoke-History", "", ReadOnly), + new SessionStateAliasEntry("ii", "Invoke-Item", "", ReadOnly), + new SessionStateAliasEntry("ipmo", "Import-Module", "", ReadOnly), + new SessionStateAliasEntry("ipal", "Import-Alias", "", ReadOnly), + new SessionStateAliasEntry("ipcsv", "Import-Csv", "", ReadOnly), + new SessionStateAliasEntry("measure", "Measure-Object", "", ReadOnly), + new SessionStateAliasEntry("mi", "Move-Item", "", ReadOnly), + new SessionStateAliasEntry("mp", "Move-ItemProperty", "", ReadOnly), + new SessionStateAliasEntry("nal", "New-Alias", "", ReadOnly), + new SessionStateAliasEntry("ndr", "New-PSDrive", "", ReadOnly), + new SessionStateAliasEntry("ni", "New-Item", "", ReadOnly), + new SessionStateAliasEntry("nv", "New-Variable", "", ReadOnly), + new SessionStateAliasEntry("nmo", "New-Module", "", ReadOnly), + new SessionStateAliasEntry("oh", "Out-Host", "", ReadOnly), + new SessionStateAliasEntry("rbp", "Remove-PSBreakpoint", "", ReadOnly), + new SessionStateAliasEntry("rdr", "Remove-PSDrive", "", ReadOnly), + new SessionStateAliasEntry("ri", "Remove-Item", "", ReadOnly), + new SessionStateAliasEntry("rni", "Rename-Item", "", ReadOnly), + new SessionStateAliasEntry("rnp", "Rename-ItemProperty", "", ReadOnly), + new SessionStateAliasEntry("rp", "Remove-ItemProperty", "", ReadOnly), + new SessionStateAliasEntry("rmo", "Remove-Module", "", ReadOnly), + new SessionStateAliasEntry("rv", "Remove-Variable", "", ReadOnly), + new SessionStateAliasEntry("rvpa", "Resolve-Path", "", ReadOnly), + new SessionStateAliasEntry("sal", "Set-Alias", "", ReadOnly), + new SessionStateAliasEntry("sbp", "Set-PSBreakpoint", "", ReadOnly), + new SessionStateAliasEntry("sc", "Set-Content", "", ReadOnly), + new SessionStateAliasEntry("select", "Select-Object", "", ReadOnly_AllScope), + new SessionStateAliasEntry("si", "Set-Item", "", ReadOnly), + new SessionStateAliasEntry("sl", "Set-Location", "", ReadOnly), + new SessionStateAliasEntry("sp", "Set-ItemProperty", "", ReadOnly), + new SessionStateAliasEntry("saps", "Start-Process", "", ReadOnly), + new SessionStateAliasEntry("spps", "Stop-Process", "", ReadOnly), + new SessionStateAliasEntry("sv", "Set-Variable", "", ReadOnly), // Web cmdlets aliases - new SessionStateAliasEntry("irm", - "Invoke-RestMethod", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("iwr", - "Invoke-WebRequest", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), + new SessionStateAliasEntry("irm", "Invoke-RestMethod", "", ReadOnly), + new SessionStateAliasEntry("iwr", "Invoke-WebRequest", "", ReadOnly), // Porting note: #if !UNIX is used to disable aliases for cmdlets which conflict with Linux / macOS #if !UNIX // ac is a native command on macOS - new SessionStateAliasEntry("ac", - "Add-Content", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("compare", - "Compare-Object", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("cpp", - "Copy-ItemProperty", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("diff", - "Compare-Object", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("gsv", - "Get-Service", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("sleep", - "Start-Sleep", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("sort", - "Sort-Object", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("start", - "Start-Process", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("sasv", - "Start-Service", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("spsv", - "Stop-Service", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("tee", - "Tee-Object", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("write", - "Write-Output", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), + new SessionStateAliasEntry("ac", "Add-Content", "", ReadOnly), + new SessionStateAliasEntry("compare", "Compare-Object", "", ReadOnly), + new SessionStateAliasEntry("cpp", "Copy-ItemProperty", "", ReadOnly), + new SessionStateAliasEntry("diff", "Compare-Object", "", ReadOnly), + new SessionStateAliasEntry("gsv", "Get-Service", "", ReadOnly), + new SessionStateAliasEntry("sleep", "Start-Sleep", "", ReadOnly), + new SessionStateAliasEntry("sort", "Sort-Object", "", ReadOnly), + new SessionStateAliasEntry("start", "Start-Process", "", ReadOnly), + new SessionStateAliasEntry("sasv", "Start-Service", "", ReadOnly), + new SessionStateAliasEntry("spsv", "Stop-Service", "", ReadOnly), + new SessionStateAliasEntry("tee", "Tee-Object", "", ReadOnly), + new SessionStateAliasEntry("write", "Write-Output", "", ReadOnly), // These were transferred from the "transferred from the profile" section - new SessionStateAliasEntry("cat", - "Get-Content", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("cp", - "Copy-Item", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("ls", - "Get-ChildItem", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("man", - "help", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("mount", - "New-PSDrive", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("mv", - "Move-Item", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("ps", - "Get-Process", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("rm", - "Remove-Item", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("rmdir", - "Remove-Item", "", ScopedItemOptions.AllScope), + new SessionStateAliasEntry("cat", "Get-Content"), + new SessionStateAliasEntry("cp", "Copy-Item", "", AllScope), + new SessionStateAliasEntry("ls", "Get-ChildItem"), + new SessionStateAliasEntry("man", "help"), + new SessionStateAliasEntry("mount", "New-PSDrive"), + new SessionStateAliasEntry("mv", "Move-Item"), + new SessionStateAliasEntry("ps", "Get-Process"), + new SessionStateAliasEntry("rm", "Remove-Item"), + new SessionStateAliasEntry("rmdir", "Remove-Item"), #endif // Bash built-ins we purposefully keep even if they override native commands - new SessionStateAliasEntry("cd", - "Set-Location", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("dir", - "Get-ChildItem", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("echo", - "Write-Output", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("fc", - "Format-Custom", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("kill", - "Stop-Process", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("pwd", - "Get-Location", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("type", - "Get-Content", "", ScopedItemOptions.AllScope), + new SessionStateAliasEntry("cd", "Set-Location", "", AllScope), + new SessionStateAliasEntry("dir", "Get-ChildItem", "", AllScope), + new SessionStateAliasEntry("echo", "Write-Output", "", AllScope), + new SessionStateAliasEntry("fc", "Format-Custom", "", ReadOnly), + new SessionStateAliasEntry("kill", "Stop-Process"), + new SessionStateAliasEntry("pwd", "Get-Location"), + new SessionStateAliasEntry("type", "Get-Content"), // Native commands we keep because the functions act correctly on Linux - new SessionStateAliasEntry("clear", - "Clear-Host", "", ScopedItemOptions.AllScope), + new SessionStateAliasEntry("clear", "Clear-Host"), //#if !CORECLR is used to disable aliases for cmdlets which are not available on OneCore #if !CORECLR - new SessionStateAliasEntry("gwmi", - "Get-WmiObject", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("iwmi", - "Invoke-WMIMethod", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("ogv", - "Out-GridView", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("ise", - "powershell_ise.exe", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("rsnp", - "Remove-PSSnapin", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("rwmi", - "Remove-WMIObject", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("swmi", - "Set-WMIInstance", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("shcm", - "Show-Command", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("trcm", - "Trace-Command", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("wget", - "Invoke-WebRequest", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("curl", - "Invoke-WebRequest", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("lp", - "Out-Printer", "", ScopedItemOptions.AllScope), + new SessionStateAliasEntry("gwmi", "Get-WmiObject", "", ReadOnly), + new SessionStateAliasEntry("iwmi", "Invoke-WMIMethod", "", ReadOnly), + new SessionStateAliasEntry("ogv", "Out-GridView", "", ReadOnly), + new SessionStateAliasEntry("ise", "powershell_ise.exe", "", ReadOnly), + new SessionStateAliasEntry("rwmi", "Remove-WMIObject", "", ReadOnly), + new SessionStateAliasEntry("swmi", "Set-WMIInstance", "", ReadOnly), + new SessionStateAliasEntry("shcm", "Show-Command", "", ReadOnly), + new SessionStateAliasEntry("trcm", "Trace-Command", "", ReadOnly), + new SessionStateAliasEntry("lp", "Out-Printer"), #endif // Aliases transferred from the profile - new SessionStateAliasEntry("h", - "Get-History", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("history", - "Get-History", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("md", - "mkdir", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("popd", - "Pop-Location", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("pushd", - "Push-Location", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("r", - "Invoke-History", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("cls", - "Clear-Host", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("chdir", - "Set-Location", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("copy", - "Copy-Item", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("del", - "Remove-Item", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("erase", - "Remove-Item", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("move", - "Move-Item", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("rd", - "Remove-Item", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("ren", - "Rename-Item", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("set", - "Set-Variable", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("icm", - "Invoke-Command", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("clhy", - "Clear-History", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), + new SessionStateAliasEntry("h", "Get-History"), + new SessionStateAliasEntry("history", "Get-History"), + new SessionStateAliasEntry("md", "mkdir", "", AllScope), + new SessionStateAliasEntry("popd", "Pop-Location", "", AllScope), + new SessionStateAliasEntry("pushd", "Push-Location", "", AllScope), + new SessionStateAliasEntry("r", "Invoke-History"), + new SessionStateAliasEntry("cls", "Clear-Host"), + new SessionStateAliasEntry("chdir", "Set-Location"), + new SessionStateAliasEntry("copy", "Copy-Item", "", AllScope), + new SessionStateAliasEntry("del", "Remove-Item", "", AllScope), + new SessionStateAliasEntry("erase", "Remove-Item"), + new SessionStateAliasEntry("move", "Move-Item", "", AllScope), + new SessionStateAliasEntry("rd", "Remove-Item"), + new SessionStateAliasEntry("ren", "Rename-Item"), + new SessionStateAliasEntry("set", "Set-Variable"), + new SessionStateAliasEntry("icm", "Invoke-Command"), + new SessionStateAliasEntry("clhy", "Clear-History", "", ReadOnly), // Job Specific aliases - new SessionStateAliasEntry("gjb", - "Get-Job", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("rcjb", - "Receive-Job", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("rjb", - "Remove-Job", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("sajb", - "Start-Job", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("spjb", - "Stop-Job", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("wjb", - "Wait-Job", "", ScopedItemOptions.AllScope), + new SessionStateAliasEntry("gjb", "Get-Job"), + new SessionStateAliasEntry("rcjb", "Receive-Job"), + new SessionStateAliasEntry("rjb", "Remove-Job"), + new SessionStateAliasEntry("sajb", "Start-Job"), + new SessionStateAliasEntry("spjb", "Stop-Job"), + new SessionStateAliasEntry("wjb", "Wait-Job"), #if !CORECLR - new SessionStateAliasEntry("sujb", - "Suspend-Job", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("rujb", - "Resume-Job", "", ScopedItemOptions.AllScope), + new SessionStateAliasEntry("sujb", "Suspend-Job"), + new SessionStateAliasEntry("rujb", "Resume-Job"), // Remoting Cmdlets Specific aliases - new SessionStateAliasEntry("npssc", - "New-PSSessionConfigurationFile", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("ipsn", - "Import-PSSession", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("epsn", - "Export-PSSession", "", ScopedItemOptions.AllScope), + new SessionStateAliasEntry("npssc", "New-PSSessionConfigurationFile", "", ReadOnly), + new SessionStateAliasEntry("ipsn", "Import-PSSession"), + new SessionStateAliasEntry("epsn", "Export-PSSession"), #endif - new SessionStateAliasEntry("cnsn", - "Connect-PSSession", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("dnsn", - "Disconnect-PSSession","", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("nsn", - "New-PSSession", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("gsn", - "Get-PSSession", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("rsn", - "Remove-PSSession", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("etsn", - "Enter-PSSession", "", ScopedItemOptions.AllScope), - new SessionStateAliasEntry("rcsn", - "Receive-PSSession", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), - new SessionStateAliasEntry("exsn", - "Exit-PSSession", "", ScopedItemOptions.AllScope), + new SessionStateAliasEntry("cnsn", "Connect-PSSession", "", ReadOnly), + new SessionStateAliasEntry("dnsn", "Disconnect-PSSession","", ReadOnly), + new SessionStateAliasEntry("nsn", "New-PSSession"), + new SessionStateAliasEntry("gsn", "Get-PSSession"), + new SessionStateAliasEntry("rsn", "Remove-PSSession"), + new SessionStateAliasEntry("etsn", "Enter-PSSession"), + new SessionStateAliasEntry("rcsn", "Receive-PSSession", "", ReadOnly), + new SessionStateAliasEntry("exsn", "Exit-PSSession"), // Win8: 121662/169179 Add "sls" alias for Select-String cmdlet // - do not use AllScope - this causes errors in profiles that set this somewhat commonly used alias. - new SessionStateAliasEntry("sls", - "Select-String", "", ScopedItemOptions.None), + new SessionStateAliasEntry("sls", "Select-String"), }; } } From bfbddc680c01e15b09f8d0ec213c819aaa70825d Mon Sep 17 00:00:00 2001 From: Jason Shirk Date: Sun, 29 Oct 2017 10:18:28 -0700 Subject: [PATCH 2/2] Update test --- .../engine/Basic/DefaultCommands.Tests.ps1 | 278 +++++++++--------- 1 file changed, 139 insertions(+), 139 deletions(-) diff --git a/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 b/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 index a6a54b3bceb..4a9e837cc28 100644 --- a/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 +++ b/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 @@ -12,163 +12,163 @@ Describe "Verify approved aliases list" -Tags "CI" { "CommandType", "Name", "Definition", "Present", "ReadOnlyOption", "AllScopeOption" "Alias", "%", "ForEach-Object", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" "Alias", "?", "Where-Object", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "ac", "Add-Content", $($FullCLR -or $CoreWindows ), "ReadOnly", "AllScope" -"Alias", "asnp", "Add-PSSnapIn", $($FullCLR ), "ReadOnly", "AllScope" -"Alias", "cat", "Get-Content", $($FullCLR -or $CoreWindows ), "", "AllScope" +"Alias", "ac", "Add-Content", $($FullCLR -or $CoreWindows ), "ReadOnly", "" +"Alias", "asnp", "Add-PSSnapIn", $($FullCLR ), "ReadOnly", "" +"Alias", "cat", "Get-Content", $($FullCLR -or $CoreWindows ), "", "" "Alias", "cd", "Set-Location", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "CFS", "ConvertFrom-String", $($FullCLR ), "ReadOnly", "AllScope" -"Alias", "chdir", "Set-Location", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "clc", "Clear-Content", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "clear", "Clear-Host", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "clhy", "Clear-History", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "cli", "Clear-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "clp", "Clear-ItemProperty", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "cls", "Clear-Host", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "clv", "Clear-Variable", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "cnsn", "Connect-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "compare", "Compare-Object", $($FullCLR -or $CoreWindows ), "ReadOnly", "AllScope" +"Alias", "CFS", "ConvertFrom-String", $($FullCLR ), "ReadOnly", "" +"Alias", "chdir", "Set-Location", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "clc", "Clear-Content", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "clear", "Clear-Host", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "clhy", "Clear-History", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "cli", "Clear-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "clp", "Clear-ItemProperty", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "cls", "Clear-Host", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "clv", "Clear-Variable", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "cnsn", "Connect-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "compare", "Compare-Object", $($FullCLR -or $CoreWindows ), "ReadOnly", "" "Alias", "copy", "Copy-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" "Alias", "cp", "Copy-Item", $($FullCLR -or $CoreWindows ), "", "AllScope" -"Alias", "cpi", "Copy-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "cpp", "Copy-ItemProperty", $($FullCLR -or $CoreWindows ), "ReadOnly", "AllScope" -"Alias", "curl", "Invoke-WebRequest", $($FullCLR ), "ReadOnly", "AllScope" -"Alias", "cvpa", "Convert-Path", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "dbp", "Disable-PSBreakpoint", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" +"Alias", "cpi", "Copy-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "cpp", "Copy-ItemProperty", $($FullCLR -or $CoreWindows ), "ReadOnly", "" +"Alias", "curl", "Invoke-WebRequest", $($FullCLR ), "ReadOnly", "" +"Alias", "cvpa", "Convert-Path", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "dbp", "Disable-PSBreakpoint", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" "Alias", "del", "Remove-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "diff", "Compare-Object", $($FullCLR -or $CoreWindows ), "ReadOnly", "AllScope" +"Alias", "diff", "Compare-Object", $($FullCLR -or $CoreWindows ), "ReadOnly", "" "Alias", "dir", "Get-ChildItem", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "dnsn", "Disconnect-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "ebp", "Enable-PSBreakpoint", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" +"Alias", "dnsn", "Disconnect-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "ebp", "Enable-PSBreakpoint", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" "Alias", "echo", "Write-Output", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "epal", "Export-Alias", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "epcsv", "Export-Csv", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "epsn", "Export-PSSession", $($FullCLR ), "", "AllScope" -"Alias", "erase", "Remove-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "etsn", "Enter-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "exsn", "Exit-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "fc", "Format-Custom", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" +"Alias", "epal", "Export-Alias", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "epcsv", "Export-Csv", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "epsn", "Export-PSSession", $($FullCLR ), "", "" +"Alias", "erase", "Remove-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "etsn", "Enter-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "exsn", "Exit-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "fc", "Format-Custom", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" "Alias", "fhx", "Format-Hex", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" -"Alias", "fl", "Format-List", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" +"Alias", "fl", "Format-List", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" "Alias", "foreach", "ForEach-Object", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "ft", "Format-Table", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "fw", "Format-Wide", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "gal", "Get-Alias", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "gbp", "Get-PSBreakpoint", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "gc", "Get-Content", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "gcb", "Get-Clipboard", $($FullCLR ), "ReadOnly", "AllScope" -"Alias", "gci", "Get-ChildItem", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "gcm", "Get-Command", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "gcs", "Get-PSCallStack", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "gdr", "Get-PSDrive", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "ghy", "Get-History", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "gi", "Get-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" +"Alias", "ft", "Format-Table", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "fw", "Format-Wide", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "gal", "Get-Alias", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "gbp", "Get-PSBreakpoint", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "gc", "Get-Content", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "gcb", "Get-Clipboard", $($FullCLR ), "ReadOnly", "" +"Alias", "gci", "Get-ChildItem", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "gcm", "Get-Command", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "gcs", "Get-PSCallStack", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "gdr", "Get-PSDrive", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "ghy", "Get-History", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "gi", "Get-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" "Alias", "gin", "Get-ComputerInfo", $($FullCLR -or $CoreWindows ), "", "" -"Alias", "gjb", "Get-Job", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "gl", "Get-Location", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "gm", "Get-Member", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "gmo", "Get-Module", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "gp", "Get-ItemProperty", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "gps", "Get-Process", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "gpv", "Get-ItemPropertyValue", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "group", "Group-Object", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "gsn", "Get-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "gsnp", "Get-PSSnapIn", $($FullCLR ), "ReadOnly", "AllScope" -"Alias", "gsv", "Get-Service", $($FullCLR -or $CoreWindows ), "ReadOnly", "AllScope" +"Alias", "gjb", "Get-Job", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "gl", "Get-Location", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "gm", "Get-Member", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "gmo", "Get-Module", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "gp", "Get-ItemProperty", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "gps", "Get-Process", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "gpv", "Get-ItemPropertyValue", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "group", "Group-Object", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "gsn", "Get-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "gsnp", "Get-PSSnapIn", $($FullCLR ), "ReadOnly", "" +"Alias", "gsv", "Get-Service", $($FullCLR -or $CoreWindows ), "ReadOnly", "" "Alias", "gtz", "Get-TimeZone", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" -"Alias", "gu", "Get-Unique", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "gv", "Get-Variable", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "gwmi", "Get-WmiObject", $($FullCLR ), "ReadOnly", "AllScope" -"Alias", "h", "Get-History", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "history", "Get-History", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "icm", "Invoke-Command", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "iex", "Invoke-Expression", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "ihy", "Invoke-History", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "ii", "Invoke-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "ipal", "Import-Alias", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "ipcsv", "Import-Csv", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "ipmo", "Import-Module", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "ipsn", "Import-PSSession", $($FullCLR ), "", "AllScope" -"Alias", "irm", "Invoke-RestMethod", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "ise", "powershell_ise.exe", $($FullCLR ), "ReadOnly", "AllScope" -"Alias", "iwmi", "Invoke-WMIMethod", $($FullCLR ), "ReadOnly", "AllScope" -"Alias", "iwr", "Invoke-WebRequest", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "kill", "Stop-Process", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "lp", "Out-Printer", $($FullCLR ), "ReadOnly", "AllScope" -"Alias", "ls", "Get-ChildItem", $($FullCLR -or $CoreWindows ), "", "AllScope" -"Alias", "man", "help", $($FullCLR -or $CoreWindows ), "", "AllScope" +"Alias", "gu", "Get-Unique", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "gv", "Get-Variable", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "gwmi", "Get-WmiObject", $($FullCLR ), "ReadOnly", "" +"Alias", "h", "Get-History", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "history", "Get-History", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "icm", "Invoke-Command", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "iex", "Invoke-Expression", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "ihy", "Invoke-History", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "ii", "Invoke-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "ipal", "Import-Alias", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "ipcsv", "Import-Csv", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "ipmo", "Import-Module", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "ipsn", "Import-PSSession", $($FullCLR ), "", "" +"Alias", "irm", "Invoke-RestMethod", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "ise", "powershell_ise.exe", $($FullCLR ), "ReadOnly", "" +"Alias", "iwmi", "Invoke-WMIMethod", $($FullCLR ), "ReadOnly", "" +"Alias", "iwr", "Invoke-WebRequest", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "kill", "Stop-Process", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "lp", "Out-Printer", $($FullCLR ), "ReadOnly", "" +"Alias", "ls", "Get-ChildItem", $($FullCLR -or $CoreWindows ), "", "" +"Alias", "man", "help", $($FullCLR -or $CoreWindows ), "", "" "Alias", "md", "mkdir", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "measure", "Measure-Object", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "mi", "Move-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "mount", "New-PSDrive", $($FullCLR -or $CoreWindows ), "", "AllScope" +"Alias", "measure", "Measure-Object", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "mi", "Move-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "mount", "New-PSDrive", $($FullCLR -or $CoreWindows ), "", "" "Alias", "move", "Move-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "mp", "Move-ItemProperty", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "mv", "Move-Item", $($FullCLR -or $CoreWindows ), "", "AllScope" -"Alias", "nal", "New-Alias", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "ndr", "New-PSDrive", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "ni", "New-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "nmo", "New-Module", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "npssc", "New-PSSessionConfigurationFile", $($FullCLR ), "ReadOnly", "AllScope" -"Alias", "nsn", "New-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "nv", "New-Variable", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "nwsn", "New-PSWorkflowSession", $($FullCLR ), "ReadOnly", "AllScope" -"Alias", "ogv", "Out-GridView", $($FullCLR ), "ReadOnly", "AllScope" -"Alias", "oh", "Out-Host", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" +"Alias", "mp", "Move-ItemProperty", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "mv", "Move-Item", $($FullCLR -or $CoreWindows ), "", "" +"Alias", "nal", "New-Alias", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "ndr", "New-PSDrive", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "ni", "New-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "nmo", "New-Module", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "npssc", "New-PSSessionConfigurationFile", $($FullCLR ), "ReadOnly", "" +"Alias", "nsn", "New-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "nv", "New-Variable", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "nwsn", "New-PSWorkflowSession", $($FullCLR ), "ReadOnly", "" +"Alias", "ogv", "Out-GridView", $($FullCLR ), "ReadOnly", "" +"Alias", "oh", "Out-Host", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" "Alias", "popd", "Pop-Location", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "ps", "Get-Process", $($FullCLR -or $CoreWindows ), "", "AllScope" +"Alias", "ps", "Get-Process", $($FullCLR -or $CoreWindows ), "", "" "Alias", "pushd", "Push-Location", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "pwd", "Get-Location", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "r", "Invoke-History", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "rbp", "Remove-PSBreakpoint", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "rcjb", "Receive-Job", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "rcsn", "Receive-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "rd", "Remove-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "rdr", "Remove-PSDrive", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "ren", "Rename-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "ri", "Remove-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "rjb", "Remove-Job", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "rm", "Remove-Item", $($FullCLR -or $CoreWindows ), "", "AllScope" -"Alias", "rmdir", "Remove-Item", $($FullCLR -or $CoreWindows ), "", "AllScope" -"Alias", "rmo", "Remove-Module", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "rni", "Rename-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "rnp", "Rename-ItemProperty", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "rp", "Remove-ItemProperty", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "rsn", "Remove-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "rsnp", "Remove-PSSnapin", $($FullCLR ), "", "AllScope" -"Alias", "rujb", "Resume-Job", $($FullCLR ), "", "AllScope" -"Alias", "rv", "Remove-Variable", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "rvpa", "Resolve-Path", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "rwmi", "Remove-WMIObject", $($FullCLR ), "ReadOnly", "AllScope" -"Alias", "sajb", "Start-Job", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "sal", "Set-Alias", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "saps", "Start-Process", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "sasv", "Start-Service", $($FullCLR -or $CoreWindows ), "ReadOnly", "AllScope" -"Alias", "sbp", "Set-PSBreakpoint", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "sc", "Set-Content", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "scb", "Set-Clipboard", $($FullCLR ), "ReadOnly", "AllScope" +"Alias", "pwd", "Get-Location", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "r", "Invoke-History", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "rbp", "Remove-PSBreakpoint", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "rcjb", "Receive-Job", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "rcsn", "Receive-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "rd", "Remove-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "rdr", "Remove-PSDrive", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "ren", "Rename-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "ri", "Remove-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "rjb", "Remove-Job", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "rm", "Remove-Item", $($FullCLR -or $CoreWindows ), "", "" +"Alias", "rmdir", "Remove-Item", $($FullCLR -or $CoreWindows ), "", "" +"Alias", "rmo", "Remove-Module", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "rni", "Rename-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "rnp", "Rename-ItemProperty", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "rp", "Remove-ItemProperty", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "rsn", "Remove-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "rsnp", "Remove-PSSnapin", $($FullCLR ), "", "" +"Alias", "rujb", "Resume-Job", $($FullCLR ), "", "" +"Alias", "rv", "Remove-Variable", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "rvpa", "Resolve-Path", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "rwmi", "Remove-WMIObject", $($FullCLR ), "ReadOnly", "" +"Alias", "sajb", "Start-Job", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "sal", "Set-Alias", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "saps", "Start-Process", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "sasv", "Start-Service", $($FullCLR -or $CoreWindows ), "ReadOnly", "" +"Alias", "sbp", "Set-PSBreakpoint", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "sc", "Set-Content", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "scb", "Set-Clipboard", $($FullCLR ), "ReadOnly", "" "Alias", "select", "Select-Object", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "set", "Set-Variable", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "shcm", "Show-Command", $($FullCLR ), "ReadOnly", "AllScope" -"Alias", "si", "Set-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "sl", "Set-Location", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "sleep", "Start-Sleep", $($FullCLR -or $CoreWindows ), "ReadOnly", "AllScope" +"Alias", "set", "Set-Variable", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "shcm", "Show-Command", $($FullCLR ), "ReadOnly", "" +"Alias", "si", "Set-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "sl", "Set-Location", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "sleep", "Start-Sleep", $($FullCLR -or $CoreWindows ), "ReadOnly", "" "Alias", "sls", "Select-String", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" -"Alias", "sort", "Sort-Object", $($FullCLR -or $CoreWindows ), "ReadOnly", "AllScope" -"Alias", "sp", "Set-ItemProperty", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "spjb", "Stop-Job", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "spps", "Stop-Process", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "spsv", "Stop-Service", $($FullCLR -or $CoreWindows ), "ReadOnly", "AllScope" -"Alias", "start", "Start-Process", $($FullCLR -or $CoreWindows ), "ReadOnly", "AllScope" +"Alias", "sort", "Sort-Object", $($FullCLR -or $CoreWindows ), "ReadOnly", "" +"Alias", "sp", "Set-ItemProperty", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "spjb", "Stop-Job", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "spps", "Stop-Process", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "spsv", "Stop-Service", $($FullCLR -or $CoreWindows ), "ReadOnly", "" +"Alias", "start", "Start-Process", $($FullCLR -or $CoreWindows ), "ReadOnly", "" "Alias", "stz", "Set-TimeZone", $($FullCLR -or $CoreWindows ), "", "" -"Alias", "sujb", "Suspend-Job", $($FullCLR ), "", "AllScope" -"Alias", "sv", "Set-Variable", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "swmi", "Set-WMIInstance", $($FullCLR ), "ReadOnly", "AllScope" -"Alias", "tee", "Tee-Object", $($FullCLR -or $CoreWindows ), "ReadOnly", "AllScope" -"Alias", "trcm", "Trace-Command", $($FullCLR ), "ReadOnly", "AllScope" -"Alias", "type", "Get-Content", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "wget", "Invoke-WebRequest", $($FullCLR ), "ReadOnly", "AllScope" +"Alias", "sujb", "Suspend-Job", $($FullCLR ), "", "" +"Alias", "sv", "Set-Variable", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "swmi", "Set-WMIInstance", $($FullCLR ), "ReadOnly", "" +"Alias", "tee", "Tee-Object", $($FullCLR -or $CoreWindows ), "ReadOnly", "" +"Alias", "trcm", "Trace-Command", $($FullCLR ), "ReadOnly", "" +"Alias", "type", "Get-Content", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "wget", "Invoke-WebRequest", $($FullCLR ), "ReadOnly", "" "Alias", "where", "Where-Object", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "AllScope" -"Alias", "wjb", "Wait-Job", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "write", "Write-Output", $($FullCLR -or $CoreWindows ), "ReadOnly", "AllScope" +"Alias", "wjb", "Wait-Job", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" +"Alias", "write", "Write-Output", $($FullCLR -or $CoreWindows ), "ReadOnly", "" "Cmdlet", "Add-Computer", , $($FullCLR ) "Cmdlet", "Add-Content", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Add-History", , $($FullCLR -or $CoreWindows -or $CoreUnix)