Files
PowerShell/test/powershell/Modules/Microsoft.PowerShell.Management/Unimplemented-Cmdlet.Tests.ps1
T
Andrew Schwartzmeyer d59710d310 Remove unimplemented Management cmdlets from Unix
These are not currently implemented and so should not show up as
available.

The *-Computer cmdlets are already not compiled for Unix (and so not
available), so let's not declare them in the manifest.

The Get-ComputerInfo cmdlet does not work on Unix and so should not be
made available.

Test-Connection depends on an unavailable WMI provider.

Get/Set-TimeZone are not yet ported.
2016-08-09 18:54:05 -07:00

31 lines
683 B
PowerShell

Describe "Unimplemented Management Cmdlet Tests" -Tags "CI" {
$Commands = @(
"Get-Service",
"Stop-Service",
"Start-Service",
"Suspend-Service",
"Resume-Service",
"Restart-Service",
"Set-Service",
"New-Service",
"Restart-Computer",
"Stop-Computer",
"Rename-Computer",
"Get-ComputerInfo",
"Test-Connection",
"Get-TimeZone",
"Set-TimeZone"
)
foreach ($Command in $Commands) {
It "$Command should only be available on Windows" {
[bool](Get-Command $Command -ErrorAction SilentlyContinue) | Should Be $IsWindows
}
}
}