如何使用PowerShell从Win32_DCOMApplicationSetting类中更改AuthenticationLevel属性?

问题描述:

我想要的AuthenticationLevel属性使用下列poweshell代码Win32_DCOMApplicationSetting改变:如何使用PowerShell从Win32_DCOMApplicationSetting类中更改AuthenticationLevel属性?

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

脚本运行没有出错,但变化不是DCOM配置applyed。

我很感激任何帮助。

我解决了!

只需从$ wmi实例调用put方法即可。

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