Powershell Grant IIS_IUSRS access to SMTP metabase

393 views Asked by At

Ok I am attempting to transfer a manual change to powershell,

Attempting to grant IIS_IUSRS access to /LM/SmtpSvc/ and /LM/SmtpSvc/1/ nodes in the IIS Metabase.

I have googled extensively and can not find an example of what i am looking for.

I have been trying to play with

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

But I am in a little over my head with WMI.

Any help would be appreciated. This setting is required for resolving This.

1

There are 1 answers

0
Lucas On BEST ANSWER

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. I will still work on a way to do the permissions settings with 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. 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. I stuck with the changing user on the app pool option because it fits in with other things as well.