Main example
List instances
# All instances of __ACE, with the main properties
Get-CimInstance -ClassName __ACE -Namespace 'root' |
Select-Object -Property AccessMask, AceFlags, AceType, GuidInheritedObjectTypeExamples
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 = '__ACE'
Namespace = 'root'
}
Get-CimInstance @cimParameters |
Select-Object -Property AccessMask, AceFlags, AceType, GuidInheritedObjectType
} 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 __ACE -Namespace 'root'
$cimClass.CimClassProperties |
Select-Object -Property Name, CimType, FlagsProperties
| Name | Type | Access | Description |
|---|---|---|---|
| AccessMask# | string | read/write | Bit flags representing rights that are granted or denied to the trustee. For more information and a description of the flags, see AccessMask property in the Win32_ACE class. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
| AceFlags# | string | read/write | Bit flags specifying the inheritance of the ACE. For more information and a description of the flags, see AceFlags property in the Win32_ACE class. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
| AceType# | string | read/write | The type of ACE entry that this instance represents. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
| GuidInheritedObjectType# | string | read/write | The GUID of the parent of the object to which the access rights in the AccessMask property apply. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
| GuidObjectType# | string | read/write | The GUID that indicates the type of object to which the rights in the AccessMask property apply. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
| TIME_CREATED# | uint64 | read | The time, in the CIM_DATETIME format, when the security descriptor was created. Code |
| Trustee# | __Trustee | read/write | The trustee of the ACE entry represented by this instance of the __ACE class. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
Remarks
This class provides the properties that are inherited by the Win32_ACE class, which is a member of the Win32_SecurityDescriptor class. 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
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.