我知道如何阅读我当前的DCOM配置:
$dcom = Get-WMIObject -Class Win32_DCOMApplicationSetting -Filter 'Description="MyComp123"'
工作正常。 但是如何创建和分配新的RunAs(身份)用户?
答案 0 :(得分:0)
请参阅此post的两个答案。我认为您可以通过AccessSecurityDescriptor
或LaunchSecurityDescriptor
更改身份。
可以通过注册表更改身份:
# We set to value to empty -> in this case the DCOM entries identitiy is set to "Launching User"
Set-ItemProperty -path ("Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{0}" -f $talDComEntry.AppID) -name "RunAs" -Value ""