Powershell 设置 COM+对此应用程序强制执行访问检查

发布于 2024-08-11 12:37:53 字数 681 浏览 1 评论 0原文

我在弄清楚用于在该应用程序属性的“安全”选项卡下选择“强制执行此应用程序的访问检查”的 Powershell 字符串是什么时遇到问题。到目前为止,我在 Powershell 中选择了其他内容:

$comAdmin = New-Object -comobject COMAdmin.COMAdminCatalog
$apps = $comAdmin.GetCollection("Applications")
$apps.Populate();
$app = $apps | Where-Object {$_.Name -eq $targetApp}

$app.Value("Identity") = $identity
$app.Value("Password") = $passwordEncrypted
$app.Value("ApplicationDirectory") = $appRootDir
$app.Value("ConcurrentApps") = 1 # set to default
$app.Value("RecycleCallLimit") = 0 # set to default
$app.Value("Activation") = 1 # dedicate local server process
$apps.SaveChanges()

现在我有了所有其他值的字符串,但我无法找出“强制执行此应用程序的访问检查”的字符串?

谢谢

I'm having problems figuring out what is the Powershell string for choosing the "Enforce access checks for this application" under the Security tab of the properties for that application. Here is what I have so far for Powershell in choosing other things:

$comAdmin = New-Object -comobject COMAdmin.COMAdminCatalog
$apps = $comAdmin.GetCollection("Applications")
$apps.Populate();
$app = $apps | Where-Object {$_.Name -eq $targetApp}

$app.Value("Identity") = $identity
$app.Value("Password") = $passwordEncrypted
$app.Value("ApplicationDirectory") = $appRootDir
$app.Value("ConcurrentApps") = 1 # set to default
$app.Value("RecycleCallLimit") = 0 # set to default
$app.Value("Activation") = 1 # dedicate local server process
$apps.SaveChanges()

Now I have all those other strings for the value but I can't figure out the one for the "Enforce access checks for this application"?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浅笑依然 2024-08-18 12:37:53

我并不

$app.Value("ApplicationAccessChecksEnabled") = 0

肯定,因为当我设置上述值时,它在 COM+ 属性中不会改变。我不确定设置该字段是否有问题。我还尝试通过属性 gui 更改值并使用以下内容获取当前值:

$app.Value("ApplicationAccessChecksEnabled")

谢谢

It will be

$app.Value("ApplicationAccessChecksEnabled") = 0

I'm not positive because when I set the above value it doesn't change in the COM+ properties. I'm not sure if there is something wrong with setting that field. I also tried changing the value through the property gui and using the following to get the current value:

$app.Value("ApplicationAccessChecksEnabled")

Thanks

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文