WMIを使用して行うようです。
Win32_DCOMApplicationSetting
次のように: のインスタンスを取得します。
$dcom = Get-WMIObject -Class Win32_DCOMApplicationSetting -Filter 'Description="Something"'
SetAccessSecurityDescriptor
これで、 メソッドとメソッドにアクセスできるようになりましたSetLaunchSecurityDescriptor
。
から: http://msdn.microsoft.com/en-us/library/windows/desktop/aa384905(v=vs.85).aspx
DCOM アプリケーション
DCOM アプリケーション インスタンスには、いくつかのセキュリティ記述子があります。Windows Vista 以降では、Win32_DCOMApplicationSetting クラスのメソッドを使用して、さまざまなセキュリティ記述子を取得または変更します。セキュリティ記述子は、Win32_SecurityDescriptor クラスのインスタンスとして返されます。
構成アクセス許可を取得または変更するには、GetConfigurationSecurityDescriptor または SetConfigurationSecurityDescriptor メソッドを呼び出します。
アクセス許可を取得または変更するには、GetAccessSecurityDescriptor または SetAccessSecurityDescriptor メソッドを呼び出します。
起動とアクティブ化のアクセス許可を取得または変更するには、GetLaunchSecurityDescriptor または SetLaunchSecurityDescriptor メソッドを呼び出します。
Windows Server 2003、Windows XP、Windows 2000、Windows NT 4.0、および Windows Me/98/95: Win32_DCOMApplicationSetting セキュリティ記述子メソッドは使用できません。
DCOMPERM というツールもあり、ソース コードは Windows SDK で入手できます: http://www.microsoft.com/en-us/download/details.aspx?id=8279
DCOMPERM コンパイル済みを検索すると、オンラインでコンパイル済みバージョンを見つけることができます。
コマンド ライン オプションは次のとおりです。
Syntax: dcomperm <option> [...]
Options:
Modify or list the machine access permission list
-ma <"set" or "remove"> <Principal Name> ["permit" or "deny"] ["level:l,r"]
-ma list
Modify or list the machine launch permission list
-ml <"set" or "remove"> <Principal Name> ["permit" or "deny"] ["level:l,r,ll,la,rl,ra"]
-ml list
Modify or list the default access permission list
-da <"set" or "remove"> <Principal Name> ["permit" or "deny"] ["level:l,r"]
-da list
Modify or list the default launch permission list
-dl <"set" or "remove"> <Principal Name> ["permit" or "deny"] ["level:l,r,ll,la,rl,ra"]
-dl list
Modify or list the access permission list for a specific AppID
-aa <AppID> <"set" or "remove"> <Principal Name> ["permit" or "deny"] ["level:l,r"]
-aa <AppID> default
-aa <AppID> list
Modify or list the launch permission list for a specific AppID
-al <AppID> <"set" or "remove"> <Principal Name> ["permit" or "deny"] ["level:l,r,ll,la,rl,ra"]
-al <AppID> default
-al <AppID> list
level:
ll - local launch (only applies to {ml, dl, al} options)
rl - remote launch (only applies to {ml, dl, al} options)
la - local activate (only applies to {ml, dl, al} options)
ra - remote activate (only applies to {ml, dl, al} options)
l - local (local access - means launch and activate when used with {ml, dl, al} options)
r - remote (remote access - means launch and activate when used with {ml, dl, al} options)