external help file | Module Name | online version | schema |
---|---|---|---|
PSScriptTools-help.xml |
PSScriptTools |
2.0.0 |
Enumerate WMI/CIM namespaces.
Get-CimNamespace [[-Namespace] <String>] [-TopLevelOnly] [-CimSession <CimSession>] [<CommonParameters>]
You can use this command to enumerate all WMI/CIM namespaces on a computer starting from ROOT. The default behavior is to recursively enumerate on the local machine, but you can query a remote computer. If you need to support alternate credentials, create a CIMSession and pass it to the command.
PS C:\> Get-CimNamespace
Root\subscription
Root\subscription\ms_41d
Root\subscription\ms_409
Root\DEFAULT
Root\DEFAULT\ms_41d
Root\DEFAULT\ms_409
Root\CIMV2
Root\CIMV2\mdm
Root\CIMV2\mdm\dmmap
...
Output is written to the pipeline as it is discovered.
PS C:\> Get-CimNamespace -Namespace root\cimv2 -TopLevelOnly
root\cimv2\mdm
root\cimv2\Security
root\cimv2\vs
root\cimv2\ms_41d
root\cimv2\power
root\cimv2\ms_409
root\cimv2\TerminalServices
root\cimv2\NV
Only get top-level namespaces under the specified namespace.
Specify a CimSession object.
Type: CimSession
Parameter Sets: (All)
Aliases: CN
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Specify the root namespace to query. The default is Root.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Only list the top-level namespaces under the specified namespace.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
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.
Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/