Main example
List instances
# All instances of __NTLMUser9X, with the main properties
Get-CimInstance -ClassName __NTLMUser9X -Namespace 'root' |
Select-Object -Property Name, Authority, Flags, MaskExamples
Filter with WQL
# WQL filter evaluated by the provider: names starting with "a" (the WQL wildcard is %)
$cimParameters = @{
ClassName = '__NTLMUser9X'
Namespace = 'root'
Filter = "Name LIKE 'a%'"
}
Get-CimInstance @cimParameters |
Select-Object -Property Name, Authority, Flags, MaskThe filter is evaluated by the WMI provider: less data is transferred than with Where-Object.
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 = '__NTLMUser9X'
Namespace = 'root'
}
Get-CimInstance @cimParameters |
Select-Object -Property Name, Authority, Flags, Mask
} 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 __NTLMUser9X -Namespace 'root'
$cimClass.CimClassProperties |
Select-Object -Property Name, CimType, FlagsProperties
| Name | Type | Access | Description |
|---|---|---|---|
| Authority# | string | read/write | Domain to which a user name applies. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
| Flags# | sint32 | read/write | Inheritance flags. 0 No inheritance. 2 Apply to child namespaces, in addition to the current one. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
| Mask# | sint32 | read/write | Bitmask that specifies access rights to the namespace in the Windows Management Instrumentation (WMI) repository. For bit values, see Namespace Access Rights Constants. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
| Name# | string | read/write | User name. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
| Type# | sint32 | read/write | Access allowed. 0 Access allowed. 2 Access denied. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
Remarks
The __NTLMUser9X class is used as an input parameter for the __SystemSecurity::Get9XUserList and __SystemSecurity::Set9XUserList methods.
Inheritance
Superclass chain
- __SecurityRelatedClass
- __NTLMUser9X
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.