问题描述
我需要执行以下操作。
创建com +应用程序 - >将激活类型设置为服务器类型 - >将身份设置为网络服务 - >添加用户组creater所有者。
Create com+ application -> set activation type to Server type-> set identity as Network service->Add user group under creater owner.
我可以设置激活类型,但我不能设置身份和进一步的步骤。
我是com +应用程序的新手。
我写的脚本如下
I am able to set activation type,but i am not able to set identity and the further steps.I am new to com+ applications. the script i have written is as follows
$comAdmin = New-Object -comobject COMAdmin.COMAdminCatalog
$apps = $comAdmin.GetCollection("Applications")
$apps.Populate();
$newComPackageName = "test7"
$appExistCheckApp = $apps | Where-Object {$_.Name -eq $newComPackageName}
if($appExistCheckApp)
{
$appExistCheckAppName = $appExistCheckApp.Value("Name")
"This COM+ Application already exists : $appExistCheckAppName"
}
Else
{
$newApp1 = $apps.Add()
$newApp1.Value("Name") = $newComPackageName
$newApp1.value("Activation") = 1
$newApp1.Value("identity").Access="NT AUTHORITY\system"
$newApp1.Value("Password") = ""
$saveChangesResult = $apps.SaveChanges()
"Results of the SaveChanges operation : $saveChangesResult"
}
我得到的错误是Identity值不正确。
请帮助:)
The error i am getting is Identity value is not correct.Please help :)
推荐答案
您可能已经解决了这一点,但我相信问题可能是1的2件事,取决于你收到的错误。
You probably fixed this at this point already, but I believe the issue could be 1 of 2 things, depending on the error you are receiving.
-
身份或密码无效 - 因此请确保您使用的是有效的凭证。
The identity or password is not valid - so just make sure you are using valid credentials.
这可能是一个无效的参数。在这种情况下,我相信将身份改为身份,它应该工作正常。例如:
It could be an invalid parameter. In that case I believe changing the 'identity' to 'Identity' and it should work fine. For example:
$ newApp1.Value DOMAIN\username
$ newApp1.Value(Password)=password
这篇关于如何设置COM +服务器类型应用程序的身份在Power Shell中的网络服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!