Main example
List instances
# All instances of __SecurityDescriptor, with the main properties
Get-CimInstance -ClassName __SecurityDescriptor -Namespace 'root' |
Select-Object -Property ControlFlags, DACL, Group, OwnerExamples
Query a remote computer (CIM session)
review before running# Name of the remote computer
$computerName = 'SERVER01'
# The CIM session (WSMan by default) can be reused for several queries
$cimSession = New-CimSession -ComputerName $computerName
try {
$cimParameters = @{
CimSession = $cimSession
ClassName = '__SecurityDescriptor'
Namespace = 'root'
}
Get-CimInstance @cimParameters |
Select-Object -Property ControlFlags, DACL, Group, Owner
} finally {
Remove-CimSession -CimSession $cimSession
}WSMan (WinRM) is used by default. For a host without WinRM, create the session with -SessionOption (New-CimSessionOption -Protocol Dcom). Add -Credential to use another account.
Show the class structure
# Class structure: properties, types and flags (Key, ReadOnly…)
$cimClass = Get-CimClass -ClassName __SecurityDescriptor -Namespace 'root'
$cimClass.CimClassProperties |
Select-Object -Property Name, CimType, FlagsProperties
| Name | Type | Access | Description |
|---|---|---|---|
| ControlFlags# | uint32 | read | Bit flags that provide information about the descriptor's contents and format. See the ControlFlags property in the Win32_SecurityDescriptor class for a description of the flags. Code |
| DACL# | __ACE[] | read/write | An array of __ACE entries that specify access to the object. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
| Group# | __ACE | read | ACE that identifies the trustee representing the group of the object. Code |
| Owner# | __ACE | read | ACE that identifies the trustee representing the owner of the object. Code |
| SACL# | __ACE | read | An array of __ACE entries that identifies users and groups for which auditing information is gathered. Code |
| TIME_CREATED# | uint64 | read | Time in the CIM_DATETIME format when the security descriptor was created. Code |
Remarks
This class provides properties inherited by Win32_SecurityDescriptor. For more information, see WMI Security Descriptor Objects and Changing Access Security on Securable Objects. For more information about ACEs, see Access Control Components.
Inheritance
Superclass chain
This class has no superclass.
Known subclasses
No known subclass.
Requirements
- Namespace
- root
- Minimum client
- Windows Vista
- Minimum server
- Windows Server 2008
- DLL
- All
Microsoft source
Descriptions, properties and methods come from the Microsoft documentation (MicrosoftDocs/win32 repository), published under the CC BY 4.0 licence. Formatting and translations are specific to this site; the PowerShell examples are written for it.