diff --git a/src/System.Management.Automation/engine/InitialSessionState.cs b/src/System.Management.Automation/engine/InitialSessionState.cs index f6a371a9d4..46fd2b99a1 100644 --- a/src/System.Management.Automation/engine/InitialSessionState.cs +++ b/src/System.Management.Automation/engine/InitialSessionState.cs @@ -4616,7 +4616,9 @@ end { new SessionStateAliasEntry("dir", "Get-ChildItem", string.Empty, AllScope), new SessionStateAliasEntry("echo", "Write-Output", string.Empty, AllScope), new SessionStateAliasEntry("fc", "Format-Custom", string.Empty, ReadOnly), +#if !UNIX new SessionStateAliasEntry("kill", "Stop-Process"), +#endif new SessionStateAliasEntry("pwd", "Get-Location"), new SessionStateAliasEntry("type", "Get-Content"), // #if !CORECLR is used to disable aliases for cmdlets which are not available on OneCore or not appropriate for PSCore6 due to conflicts diff --git a/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 b/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 index 7854270532..1c64bc8171 100644 --- a/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 +++ b/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 @@ -94,7 +94,7 @@ Describe "Verify approved aliases list" -Tags "CI" { "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", "kill", "Stop-Process", $($FullCLR -or $CoreWindows ), "", "", "" "Alias", "lp", "Out-Printer", $($FullCLR ), "ReadOnly", "", "" "Alias", "ls", "Get-ChildItem", $($FullCLR -or $CoreWindows ), "", "", "" "Alias", "man", "help", $($FullCLR -or $CoreWindows ), "", "", ""