Main example
List instances
# All instances of Win32_DCOMApplicationSetting, with the main properties
Get-CimInstance -ClassName Win32_DCOMApplicationSetting |
Select-Object -Property AppID, Caption, Description, AuthenticationLevelExamples
Filter with WQL
# WQL filter evaluated by the provider: AuthenticationLevel = 2 (Connect)
Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Filter 'AuthenticationLevel = 2' |
Select-Object -Property AppID, Caption, Description, AuthenticationLevelThe filter is evaluated by the WMI provider: less data is transferred than with Where-Object.
Decode numeric values
# Lookup table for AuthenticationLevel (values documented by Microsoft)
$authenticationLevelName = @{
1 = 'None'
2 = 'Connect'
3 = 'Call'
4 = 'Packet'
5 = 'PacketIntegrity'
6 = 'PacketPrivacy'
}
Get-CimInstance -ClassName Win32_DCOMApplicationSetting |
Select-Object -Property @(
'AppID'
'Caption'
'Description'
@{ Name = 'AuthenticationLevel'; Expression = { $authenticationLevelName[[int]$_.AuthenticationLevel] } }
)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 {
Get-CimInstance -CimSession $cimSession -ClassName Win32_DCOMApplicationSetting |
Select-Object -Property AppID, Caption, Description, AuthenticationLevel
} 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 Win32_DCOMApplicationSetting
$cimClass.CimClassProperties |
Select-Object -Property Name, CimType, Flags
# Methods of the class
$cimClass.CimClassMethods |
Select-Object -Property Name, ReturnTypeProperties
| Name | Type | Access | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AppID# key | string | read | Globally unique identifier (GUID) for this DCOM application. Code | |||||||||||||||||||||
| AuthenticationLevel# | uint32 | read/write | Minimum client authentication level required by this COM server. If NULL, the default values are used. Values (6)
CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||||||||||||||
| Caption# | string | read | Short textual description of the current object. Code | |||||||||||||||||||||
| CustomSurrogate# | string | read | Name of the custom surrogate in which the in-process DCOM application is activated. If this value is NULL and the UseSurrogate key is TRUE, then the system provides a surrogate process. Code | |||||||||||||||||||||
| Description# | string | read | Textual description of the current object. Code | |||||||||||||||||||||
| EnableAtStorageActivation# | boolean | read | DCOM application retrieves the saved state of the application or begins from the state in which the application is first initialized. Code | |||||||||||||||||||||
| LocalService# | string | read | Name for the services provided by the DCOM application. Code | |||||||||||||||||||||
| RemoteServerName# | string | read/write | Name of the remote server where the application is activated. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. | |||||||||||||||||||||
| RunAsUser# | string | read | Specific user account under which the application is to be run on activation. Code | |||||||||||||||||||||
| ServiceParameters# | string | read | Command-line parameters passed to the DCOM application. This is valid only if the application is written as a Windows-based service. Code | |||||||||||||||||||||
| SettingID# | string | read | Identifier by which the current object is known. Code | |||||||||||||||||||||
| UseSurrogate# | boolean | read/write | DCOM application can be activated as an out-of-process server by use of a surrogate executable file. CodeWarning. Changes the system: check with -WhatIf first. An elevated console is often required. |
Methods
GetAccessSecurityDescriptor #
Gets the security descriptor that controls who is allowed to access a DCOM application.
uint32 GetAccessSecurityDescriptor([out] Win32_SecurityDescriptor Descriptor);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| Descriptor | Win32_SecurityDescriptor | out | The security descriptor to set for the DCOM application. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Success | Successful completion |
| 2 | The user does not have access to the requested information | |
| 8 | Unknown failure | |
| 9 | The user does not have adequate privileges to execute the method | |
| 21 | A parameter specified in the method call is invalid | |
| 1..4294967295 | Other |
Call the GetAccessSecurityDescriptor method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Filter "AppID = 'Example'"
$methodParameters = @{
InputObject = $instance
MethodName = 'GetAccessSecurityDescriptor'
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Success'
2 = 'The user does not have access to the requested information'
8 = 'Unknown failure'
9 = 'The user does not have adequate privileges to execute the method'
21 = 'A parameter specified in the method call is invalid'
}
$returnValueName[[int]$result.ReturnValue]
$result.Descriptor
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
GetConfigurationSecurityDescriptor #
Gets the security descriptor that controls who is allowed to configure a DCOM application.
uint32 GetConfigurationSecurityDescriptor([out] Win32_SecurityDescriptor Descriptor);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| Descriptor | Win32_SecurityDescriptor | out | The security descriptor to set for the DCOM application. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Success | Successful completion |
| 2 | The user does not have access to the requested information | |
| 8 | Unknown failure | |
| 9 | The user does not have adequate privileges to execute the method | |
| 21 | A parameter specified in the method call is invalid | |
| 1..4294967295 | Other |
Call the GetConfigurationSecurityDescriptor method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Filter "AppID = 'Example'"
$methodParameters = @{
InputObject = $instance
MethodName = 'GetConfigurationSecurityDescriptor'
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Success'
2 = 'The user does not have access to the requested information'
8 = 'Unknown failure'
9 = 'The user does not have adequate privileges to execute the method'
21 = 'A parameter specified in the method call is invalid'
}
$returnValueName[[int]$result.ReturnValue]
$result.Descriptor
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
GetLaunchSecurityDescriptor #
Gets the security descriptor that controls who is allowed to launch a DCOM application.
uint32 GetLaunchSecurityDescriptor([out] Win32_SecurityDescriptor Descriptor);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| Descriptor | Win32_SecurityDescriptor | out | The security descriptor to set that controls who can start the DCOM application. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Success | Successful completion. |
| 2 | The user does not have access to the requested information. | |
| 8 | Unknown failure. | |
| 9 | The user does not have adequate privileges to execute the method. | |
| 21 | A parameter specified in the method call is not valid. | |
| 1..4294967295 | Other |
Call the GetLaunchSecurityDescriptor method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Filter "AppID = 'Example'"
$methodParameters = @{
InputObject = $instance
MethodName = 'GetLaunchSecurityDescriptor'
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Success'
2 = 'The user does not have access to the requested information'
8 = 'Unknown failure'
9 = 'The user does not have adequate privileges to execute the…'
21 = 'A parameter specified in the method call is not valid'
}
$returnValueName[[int]$result.ReturnValue]
$result.Descriptor
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetAccessSecurityDescriptor #
Updates the access security descriptor of the DCOM application with a new security descriptor that is defined by an instance of the Win32_SecurityDescriptor class.
uint32 SetAccessSecurityDescriptor([in] Win32_SecurityDescriptor Descriptor);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| Descriptor | Win32_SecurityDescriptor | in | The security descriptor to set for the DCOM application. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Success | Successful completion |
| 2 | The user does not have access to the requested information | |
| 8 | Unknown failure | |
| 9 | The user does not have adequate privileges to execute the method | |
| 21 | A parameter specified in the method call is invalid | |
| 1..4294967295 | Other |
Call the SetAccessSecurityDescriptor method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Filter "AppID = 'Example'"
$methodParameters = @{
InputObject = $instance
MethodName = 'SetAccessSecurityDescriptor'
Arguments = @{ Descriptor = $null }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Success'
2 = 'The user does not have access to the requested information'
8 = 'Unknown failure'
9 = 'The user does not have adequate privileges to execute the method'
21 = 'A parameter specified in the method call is invalid'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetConfigurationSecurityDescriptor #
Updates the configuration security descriptor of the DCOM application with a new security descriptor that is defined by an instance of the Win32_SecurityDescriptor class.
uint32 SetConfigurationSecurityDescriptor([in] Win32_SecurityDescriptor Descriptor);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| Descriptor | Win32_SecurityDescriptor | in | The security descriptor to set for the DCOM application. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Success | Successful completion |
| 2 | The user does not have access to the requested information | |
| 8 | Unknown failure | |
| 9 | The user does not have adequate privileges to execute the method | |
| 21 | A parameter specified in the method call is invalid | |
| 1..4294967295 | Other |
Call the SetConfigurationSecurityDescriptor method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Filter "AppID = 'Example'"
$methodParameters = @{
InputObject = $instance
MethodName = 'SetConfigurationSecurityDescriptor'
Arguments = @{ Descriptor = $null }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Success'
2 = 'The user does not have access to the requested information'
8 = 'Unknown failure'
9 = 'The user does not have adequate privileges to execute the method'
21 = 'A parameter specified in the method call is invalid'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetLaunchSecurityDescriptor #
Updates the launch security descriptor of the DCOM application with a new security descriptor that is defined by an instance of the Win32_SecurityDescriptor class.
uint32 SetLaunchSecurityDescriptor([in] Win32_SecurityDescriptor Descriptor);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| Descriptor | Win32_SecurityDescriptor | in | The security descriptor to set that controls who can start the DCOM application. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Success | Successful completion. |
| 2 | The user does not have access to the requested information. | |
| 8 | Unknown failure. | |
| 9 | The user does not have adequate privileges to execute the method. | |
| 21 | A parameter specified in the method call is not valid. | |
| 1..4294967295 | Other |
Call the SetLaunchSecurityDescriptor method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Filter "AppID = 'Example'"
$methodParameters = @{
InputObject = $instance
MethodName = 'SetLaunchSecurityDescriptor'
Arguments = @{ Descriptor = $null }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Success'
2 = 'The user does not have access to the requested information'
8 = 'Unknown failure'
9 = 'The user does not have adequate privileges to execute the…'
21 = 'A parameter specified in the method call is not valid'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
Remarks
The Win32_DCOMApplicationSetting class is derived from Win32_COMSetting.
Inheritance
Superclass chain
- CIM_Setting
- Win32_COMSetting
- Win32_DCOMApplicationSetting
Known subclasses
No known subclass.
Requirements
- Namespace
- root/cimv2
- Minimum client
- Windows Vista
- Minimum server
- Windows Server 2008
- Provider
- CIMWin32
- MOF file
- CIMWin32.mof
- DLL
- CIMWin32.dll
Class qualifiers
Dynamic Provider("CIMWin32") UUID("{E5D8A561-F6C0-11d2-B35E-00105A1F8569}") AMENDMENT
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.