external help file | Module Name | online version | schema |
---|---|---|---|
PSScriptTools-help.xml |
PSScriptTools |
2.0.0 |
Get the properties of a CIM class.
Get-CimClassProperty [-ClassName] <String> [-Namespace <String>] [-Property <String>]
[-CimSession <CimSession>] [<CommonParameters>]
Get-CimClassProperty [-ClassName] <String> [-Namespace <String>] [-KeyOnly] [-CimSession <CimSession>] [<CommonParameters>]
This command is an alternative to Get-CimClass to make it easier to get information about properties of a WMI/CIM class. The default behavior is to query classes on the local host, but you can query a remote computer using the CimSession parameter. You can specify a computer name, or an existing CIMSession if you need alternate credentials.
PS C:\> Get-CimClassProperty Win32_ace
Class: Root/Cimv2:Win32_ACE
Property ValueType Flags
-------- --------- -----
AccessMask UInt32 NullValue
AceFlags UInt32 NullValue
AceType UInt32 NullValue
GuidInheritedObjectType String NullValue
GuidObjectType String NullValue
TIME_CREATED UInt64 NullValue
Trustee Instance NullValue
The default is to get all properties. Key properties, if defined, will be highlighted in the output.
PS C:\> Get-CimClassProperty Win32_OperatingSystem -Property *memory*
Class: Root/Cimv2:Win32_OperatingSystem
Property ValueType Flags
-------- --------- -----
FreePhysicalMemory UInt64 ReadOnly, NullValue
FreeVirtualMemory UInt64 ReadOnly, NullValue
MaxProcessMemorySize UInt64 ReadOnly, NullValue
TotalVirtualMemorySize UInt64 ReadOnly, NullValue
TotalVisibleMemorySize UInt64 ReadOnly, NullValue
You can use wildcards to filter properties.
PS C:\> Get-CimClassProperty win32_process -KeyOnly
Class: Root/Cimv2:Win32_Process
Property ValueType Flags
-------- --------- -----
Handle String Key, ReadOnly, NullValue
You can limit the results to key properties only.
Specify a computer name or an existing 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 a CIM Class
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Only show Key properties
Type: SwitchParameter
Parameter Sets: key
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify the class namespace beginning with ROOT.
Type: String
Parameter Sets: (All)
Aliases: NS
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify a property name. Wildcards are permitted.
Type: String
Parameter Sets: property
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.