Exclude PSHostProcess cmdlets from Unix platforms (#5105)

- Exclude 'Get-PSHostProcessInfo', 'Enter-PSHostProcess' and 'Exit-PSHostProcess' from Unix platforms.
- Update tests and add additional cmdlets need to be excluded
This commit is contained in:
Chunqing Chen 2017-10-18 09:26:24 -07:00 committed by Dongbo Wang
parent 6177d28410
commit dd5fba3313
3 changed files with 7 additions and 6 deletions

View file

@ -5504,11 +5504,12 @@ if($paths) {
#if !UNIX
{"Disable-PSRemoting", new SessionStateCmdletEntry("Disable-PSRemoting", typeof(DisablePSRemotingCommand), helpFile) },
{"Enable-PSRemoting", new SessionStateCmdletEntry("Enable-PSRemoting", typeof(EnablePSRemotingCommand), helpFile) },
{"Get-PSHostProcessInfo", new SessionStateCmdletEntry("Get-PSHostProcessInfo", typeof(GetPSHostProcessInfoCommand), helpFile) },
{"Enter-PSHostProcess", new SessionStateCmdletEntry("Enter-PSHostProcess", typeof(EnterPSHostProcessCommand), helpFile) },
{"Exit-PSHostProcess", new SessionStateCmdletEntry("Exit-PSHostProcess", typeof(ExitPSHostProcessCommand), helpFile) },
#endif
{"Enable-PSSessionConfiguration", new SessionStateCmdletEntry("Enable-PSSessionConfiguration", typeof(EnablePSSessionConfigurationCommand), helpFile) },
{"Enter-PSHostProcess", new SessionStateCmdletEntry("Enter-PSHostProcess", typeof(EnterPSHostProcessCommand), helpFile) },
{"Enter-PSSession", new SessionStateCmdletEntry("Enter-PSSession", typeof(EnterPSSessionCommand), helpFile) },
{"Exit-PSHostProcess", new SessionStateCmdletEntry("Exit-PSHostProcess", typeof(ExitPSHostProcessCommand), helpFile) },
{"Exit-PSSession", new SessionStateCmdletEntry("Exit-PSSession", typeof(ExitPSSessionCommand), helpFile) },
{"Export-ModuleMember", new SessionStateCmdletEntry("Export-ModuleMember", typeof(ExportModuleMemberCommand), helpFile) },
{"ForEach-Object", new SessionStateCmdletEntry("ForEach-Object", typeof(ForEachObjectCommand), helpFile) },
@ -5517,7 +5518,6 @@ if($paths) {
{"Get-History", new SessionStateCmdletEntry("Get-History", typeof(GetHistoryCommand), helpFile) },
{"Get-Job", new SessionStateCmdletEntry("Get-Job", typeof(GetJobCommand), helpFile) },
{"Get-Module", new SessionStateCmdletEntry("Get-Module", typeof(GetModuleCommand), helpFile) },
{"Get-PSHostProcessInfo", new SessionStateCmdletEntry("Get-PSHostProcessInfo", typeof(GetPSHostProcessInfoCommand), helpFile) },
{"Get-PSSession", new SessionStateCmdletEntry("Get-PSSession", typeof(GetPSSessionCommand), helpFile) },
{"Get-PSSessionCapability", new SessionStateCmdletEntry("Get-PSSessionCapability", typeof(GetPSSessionCapabilityCommand), helpFile) },
{"Get-PSSessionConfiguration", new SessionStateCmdletEntry("Get-PSSessionConfiguration", typeof(GetPSSessionConfigurationCommand), helpFile) },

View file

@ -218,9 +218,9 @@ Describe "Verify approved aliases list" -Tags "CI" {
"Cmdlet", "Enable-PSSessionConfiguration", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Enable-RunspaceDebug", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Enable-WSManCredSSP", , $($FullCLR -or $CoreWindows )
"Cmdlet", "Enter-PSHostProcess", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Enter-PSHostProcess", , $($FullCLR -or $CoreWindows )
"Cmdlet", "Enter-PSSession", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Exit-PSHostProcess", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Exit-PSHostProcess", , $($FullCLR -or $CoreWindows )
"Cmdlet", "Exit-PSSession", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Export-Alias", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Export-Clixml", , $($FullCLR -or $CoreWindows -or $CoreUnix)
@ -274,7 +274,7 @@ Describe "Verify approved aliases list" -Tags "CI" {
"Cmdlet", "Get-PSBreakpoint", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Get-PSCallStack", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Get-PSDrive", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Get-PSHostProcessInfo", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Get-PSHostProcessInfo", , $($FullCLR -or $CoreWindows )
"Cmdlet", "Get-PSProvider", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Get-PSSession", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Get-PSSessionCapability", , $($FullCLR -or $CoreWindows -or $CoreUnix)

View file

@ -280,3 +280,4 @@ Describe "Remoting loopback tests" -Tags @('CI', 'RequireAdminOnWindows') {
$result | Should Be 100
}
}