简体   繁体   English

Powershell授予IIS_IUSRS对SMTP元数据库的访问权限

[英]Powershell Grant IIS_IUSRS access to SMTP metabase

Ok I am attempting to transfer a manual change to powershell, 好的,我尝试将手动更改转移到Powershell,

Attempting to grant IIS_IUSRS access to /LM/SmtpSvc/ and /LM/SmtpSvc/1/ nodes in the IIS Metabase. 尝试授予IIS_IUSRS对IIS元数据库中的/ LM / SmtpSvc /和/ LM / SmtpSvc / 1 /节点的访问权限。

I have googled extensively and can not find an example of what i am looking for. 我在Google上进行了广泛的搜索,找不到我想要的示例。

I have been trying to play with 我一直在尝试和

$smtp = [wmiclass]'root\\MicrosoftIISv2:IIsSmtpServerSetting' $ smtp = [wmiclass]'root \\ MicrosoftIISv2:IIsSmtpServerSetting'

But I am in a little over my head with WMI. 但是我对WMI有点不知所措。

Any help would be appreciated. 任何帮助,将不胜感激。 This setting is required for resolving This . 解决此问题需要此设置。

Not an exact answer, but the best I have so far. 这不是一个确切的答案,但是到目前为止我有最好的答案。 Following the Guide here I chose option 1 and changed the app pool to network service. 根据此处的指南我选择了选项1,并将应用程序池更改为网络服务。 I will still work on a way to do the permissions settings with powershell. 我仍将使用Powershell进行权限设置。

Update (solution untested) 更新 (未经测试的解决方案)

I found this answer on another post that details how to do it using scripts in the iis6.0 resource toolkit. 我在另一篇文章中找到了这个答案,该文章详细介绍了如何使用iis6.0资源工具包中的脚本来执行此操作。 To get these scripts on server 2012 you have to install the IIS6.0 resource toolkit, the only way i can find to do a silent install of this one was located here from there you can call the scripts using cscript.exe. 要在服务器2012上获取这些脚本,您必须安装IIS6.0资源工具包,从这里可以找到我进行静默安装的唯一方法,您可以在此处使用cscript.exe调用脚本。 I stuck with the changing user on the app pool option because it fits in with other things as well. 我在应用程序池选项上坚持使用不断变化的用户,因为它也适合其他情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM