Murilo Faria
Murilo Faria

Reputation: 43

How to change AuthenticationLevel attribute from Win32_DCOMApplicationSetting class using powershell?

I'm trying to change the AuthenticationLevel attribute from Win32_DCOMApplicationSetting using the following poweshell code:

$wmi = Get-WMIObject -Class Win32_DCOMApplicationSetting -Filter "AppID='{00020906-0000-0000-C000-000000000046}'" -EnableAllPrivileges
$wmi.AuthenticationLevel = 1

The script runs without errors, but the change isn't applyed in DCOM configurations.

I appreciate any help.

Upvotes: 1

Views: 653

Answers (1)

Murilo Faria
Murilo Faria

Reputation: 43

I solved it!

Just call the put method from $wmi instance.

$wmi = Get-WMIObject -Class Win32_DCOMApplicationSetting -Filter "AppID='{00020906-0000-0000-C000-000000000046}'" -EnableAllPrivileges
$wmi.AuthenticationLevel = 2
$wmi.put()

Upvotes: 1

Related Questions