I have a Powershell script to set up a WS2012 web server with no user interaction. The only thing I can't do in the script is to change the identity of a DCOM application. Or, more specifically, I cannot set the password of the user.
I know it's a registry key trick, but the only thing I can achieve is:
$keypath = "HKLM:\SOFTWARE\Classes\AppID\{key-ID}"
Set-ItemProperty -Path $keypath -Name RunAs -Value domain\user
Which creates a REG_SZ
called RunAs
with the value domain\user
, so it works. Via UI, navigating to that DCOM application the identity has been set correctly, but not its password, and I cannot find how to do it.
Any hints?