Win32_DCOMApplicationSetting

Win32 DCOMApplication Setting
root/cimv2dynamickey : AppID

The Win32_DCOMApplicationSetting WMI class represents the settings of a DCOM application.

On this page

Main example

List instances

# All instances of Win32_DCOMApplicationSetting, with the main properties
Get-CimInstance -ClassName Win32_DCOMApplicationSetting |
    Select-Object -Property AppID, Caption, Description, AuthenticationLevel

Examples

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, AuthenticationLevel

The 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, ReturnType

Properties

12 of 12 properties
NameTypeAccessDescription
AppID keystringread

Globally unique identifier (GUID) for this DCOM application.

Code
# Value of AppID for each instance
Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Property AppID |
    Select-Object -Property AppID
AuthenticationLeveluint32read/write

Minimum client authentication level required by this COM server. If NULL, the default values are used.

Values (6)
ValueLabelDescription
1NoneNone (no authentication is performed)
2ConnectConnect (authentication is performed only when the client establishes a relationship with the application)
3CallCall (authentication is performed only at the beginning of each call when the application receives the request)
4PacketPacket (authentication is performed on all of the data received from the client)
5PacketIntegrityPacketIntegrity (all of the data transferred between the client and the application is authenticated and verified)
6PacketPrivacyPacketPrivacy (the properties of the other authentication levels are used and all of the data is encrypted)
Code
# Value of AuthenticationLevel for each instance
# 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 -Property AppID, AuthenticationLevel |
    Select-Object -Property @(
        'AppID'
        @{ Name = 'AuthenticationLevel'; Expression = { $authenticationLevelName[[int]$_.AuthenticationLevel] } }
    )

Warning. Changes the system: check with -WhatIf first. An elevated console is often required.

# Warning: changes AuthenticationLevel on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Filter "AppID = 'Example'"
$setParameters = @{
    InputObject = $instance
    Property    = @{ AuthenticationLevel = 2 }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
Captionstringread

Short textual description of the current object.

Code
# Value of Caption for each instance
Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Property AppID, Caption |
    Select-Object -Property AppID, Caption
CustomSurrogatestringread

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
# Value of CustomSurrogate for each instance
Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Property AppID, CustomSurrogate |
    Select-Object -Property AppID, CustomSurrogate
Descriptionstringread

Textual description of the current object.

Code
# Value of Description for each instance
Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Property AppID, Description |
    Select-Object -Property AppID, Description
EnableAtStorageActivationbooleanread

DCOM application retrieves the saved state of the application or begins from the state in which the application is first initialized.

Code
# Value of EnableAtStorageActivation for each instance
Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Property AppID, EnableAtStorageActivation |
    Select-Object -Property AppID, EnableAtStorageActivation
LocalServicestringread

Name for the services provided by the DCOM application.

Code
# Value of LocalService for each instance
Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Property AppID, LocalService |
    Select-Object -Property AppID, LocalService
RemoteServerNamestringread/write

Name of the remote server where the application is activated.

Code
# Value of RemoteServerName for each instance
Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Property AppID, RemoteServerName |
    Select-Object -Property AppID, RemoteServerName

Warning. Changes the system: check with -WhatIf first. An elevated console is often required.

# Warning: changes RemoteServerName on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Filter "AppID = 'Example'"
$setParameters = @{
    InputObject = $instance
    Property    = @{ RemoteServerName = 'Example' }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters
RunAsUserstringread

Specific user account under which the application is to be run on activation.

Code
# Value of RunAsUser for each instance
Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Property AppID, RunAsUser |
    Select-Object -Property AppID, RunAsUser
ServiceParametersstringread

Command-line parameters passed to the DCOM application. This is valid only if the application is written as a Windows-based service.

Code
# Value of ServiceParameters for each instance
Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Property AppID, ServiceParameters |
    Select-Object -Property AppID, ServiceParameters
SettingIDstringread

Identifier by which the current object is known.

Code
# Value of SettingID for each instance
Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Property AppID, SettingID |
    Select-Object -Property AppID, SettingID
UseSurrogatebooleanread/write

DCOM application can be activated as an out-of-process server by use of a surrogate executable file.

Code
# Value of UseSurrogate for each instance
Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Property AppID, UseSurrogate |
    Select-Object -Property AppID, UseSurrogate

Warning. Changes the system: check with -WhatIf first. An elevated console is often required.

# Warning: changes UseSurrogate on the instance. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_DCOMApplicationSetting -Filter "AppID = 'Example'"
$setParameters = @{
    InputObject = $instance
    Property    = @{ UseSurrogate = $false }
    WhatIf      = $true  # Remove this line to actually apply the change
}
Set-CimInstance @setParameters

Methods

GetAccessSecurityDescriptor #

Gets the security descriptor that controls who is allowed to access a DCOM application.

uint32 GetAccessSecurityDescriptor([out] Win32_SecurityDescriptor Descriptor);

Parameters

ParameterTypeDirectionDescription
DescriptorWin32_SecurityDescriptorout

The security descriptor to set for the DCOM application.

Return values

ValueLabelDescription
0SuccessSuccessful completion
2The user does not have access to the requested information
8Unknown failure
9The user does not have adequate privileges to execute the method
21A parameter specified in the method call is invalid
1..4294967295Other

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

ParameterTypeDirectionDescription
DescriptorWin32_SecurityDescriptorout

The security descriptor to set for the DCOM application.

Return values

ValueLabelDescription
0SuccessSuccessful completion
2The user does not have access to the requested information
8Unknown failure
9The user does not have adequate privileges to execute the method
21A parameter specified in the method call is invalid
1..4294967295Other

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

ParameterTypeDirectionDescription
DescriptorWin32_SecurityDescriptorout

The security descriptor to set that controls who can start the DCOM application.

Return values

ValueLabelDescription
0SuccessSuccessful completion.
2The user does not have access to the requested information.
8Unknown failure.
9The user does not have adequate privileges to execute the method.
21A parameter specified in the method call is not valid.
1..4294967295Other

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

ParameterTypeDirectionDescription
DescriptorWin32_SecurityDescriptorin

The security descriptor to set for the DCOM application.

Return values

ValueLabelDescription
0SuccessSuccessful completion
2The user does not have access to the requested information
8Unknown failure
9The user does not have adequate privileges to execute the method
21A parameter specified in the method call is invalid
1..4294967295Other

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

ParameterTypeDirectionDescription
DescriptorWin32_SecurityDescriptorin

The security descriptor to set for the DCOM application.

Return values

ValueLabelDescription
0SuccessSuccessful completion
2The user does not have access to the requested information
8Unknown failure
9The user does not have adequate privileges to execute the method
21A parameter specified in the method call is invalid
1..4294967295Other

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

ParameterTypeDirectionDescription
DescriptorWin32_SecurityDescriptorin

The security descriptor to set that controls who can start the DCOM application.

Return values

ValueLabelDescription
0SuccessSuccessful completion.
2The user does not have access to the requested information.
8Unknown failure.
9The user does not have adequate privileges to execute the method.
21A parameter specified in the method call is not valid.
1..4294967295Other

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

  1. CIM_Setting
  2. Win32_COMSetting
  3. 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

Source: Microsoft Learn

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.