external help file | Module Name | online version | schema |
---|---|---|---|
ComputerManagement-help.xml |
ComputerManagement |
2.0.0 |
Return a collection of classes from a namespace
Get-Namespace [-Namespace] <String> [-ComputerName] <String> [<CommonParameters>]
This function will return a collection of classes from the provided namespace. This method uses SWbemLocator to connect to a computer, the resulting SWbemServices object is used to return the SubclassesOf() the given namespace.
Get-Namespace -Namespace 'root\ccm' -ComputerName 'sccm'
Path : \\\\SCCM\ROOT\ccm:__NAMESPACE
RelPath : __NAMESPACE
Server : SCCM
Namespace : ROOT\ccm
ParentNamespace : ROOT
DisplayName : WINMGMTS:{authenticationLevel=pkt,impersonationLevel=impersonate}!\\\\SCCM\ROOT\ccm:__NAMESPACE
Class : __NAMESPACE
IsClass : True
IsSingleton : False
Keys : System.__ComObject
Security_ : System.__ComObject
Locale :
Authority :
A simple example showing usage and output of the command.
Get-Namespace -Namespace $NameSpace -ComputerName $ComputerName |Select-Object -Property Class
Class
-----
__SystemClass
__thisNAMESPACE
__NAMESPACE
__Provider
__Win32Provider
__ProviderRegistration
__EventProviderRegistration
__EventConsumerProviderRegistration
This example shows piping the output of the Get-Namespace function to Select-Object to return one of the properties of a class.
The computer to connect to
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The WMI namespace to enumerate
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
FunctionName : Get-Namespace Created by : jspatton Date Coded : 05/21/2012 12:50:50