mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
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.
This commit is contained in:
1 parent
f68cb8c385
commit
d59710d310
2 files changed
+31
-17
No files matched your search
+1
-17
@@ -7,7 +7,6 @@ ModuleVersion="3.1.0.0"
|
|||||||
PowerShellVersion="3.0"
|
PowerShellVersion="3.0"
|
||||||
NestedModules="Microsoft.PowerShell.Commands.Management.dll"
|
NestedModules="Microsoft.PowerShell.Commands.Management.dll"
|
||||||
HelpInfoURI = 'http://go.microsoft.com/fwlink/?linkid=390785'
|
HelpInfoURI = 'http://go.microsoft.com/fwlink/?linkid=390785'
|
||||||
AliasesToExport = @("gin", "gtz", "stz")
|
|
||||||
FunctionsToExport = @()
|
FunctionsToExport = @()
|
||||||
CmdletsToExport=@("Add-Content",
|
CmdletsToExport=@("Add-Content",
|
||||||
"Clear-Content",
|
"Clear-Content",
|
||||||
@@ -48,21 +47,6 @@ CmdletsToExport=@("Add-Content",
|
|||||||
"Remove-ItemProperty",
|
"Remove-ItemProperty",
|
||||||
"Rename-ItemProperty",
|
"Rename-ItemProperty",
|
||||||
"Resolve-Path",
|
"Resolve-Path",
|
||||||
"Get-Service",
|
|
||||||
"Stop-Service",
|
|
||||||
"Start-Service",
|
|
||||||
"Suspend-Service",
|
|
||||||
"Resume-Service",
|
|
||||||
"Restart-Service",
|
|
||||||
"Set-Service",
|
|
||||||
"New-Service",
|
|
||||||
"Set-Content",
|
"Set-Content",
|
||||||
"Set-ItemProperty",
|
"Set-ItemProperty")
|
||||||
"Test-Connection",
|
|
||||||
"Restart-Computer",
|
|
||||||
"Stop-Computer",
|
|
||||||
"Rename-Computer",
|
|
||||||
"Get-ComputerInfo",
|
|
||||||
"Get-TimeZone",
|
|
||||||
"Set-TimeZone")
|
|
||||||
}
|
}
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user