Hej
Jeg bruger dette script, til at tilføje IUSR_xx:
-------------------------------------------------------------------------------
'This script adds an access control entry (ACE) for a specified account with Read and Enumerate rights to all SMTP service instances.
'To use this script, run the following command at a command prompt:
'cscript mbaadd.vbs <ComputerName>\<AccountName>
Option explicit
Dim objSMTP, objInst, objSD, objACL, objACE, objNew
Dim sAccount
sAccount = wscript.arguments(0)
wscript.echo "Updating SMTP service instances..."
Set objSMTP = GetObject("
IIS://LOCALHOST/SMTPSVC")
For Each objInst In objSMTP
If objInst.class = "IIsSmtpServer" Then
wscript.echo objInst.ADSPath
set objSD = objInst.AdminACL
set objACL = objSD.DiscretionaryACL
set objNew = CreateObject("AccessControlEntry")
objNew.AccessMask = 9 ' read + enumerate
objNew.AceType = 0 ' ADS_ACETYPE_ACCESS_ALLOWED
objNew.AceFlags = 2 ' ADS_ACEFLAG_INHERIT_ACE
objNew.Trustee = sAccount
objACL.AddAce objNew
objSD.DiscretionaryACL = objACL
objInst.Put "adminACL", Array(objSD)
objInst.SetInfo
End If
Next
-------------------------------------------------------------------------------
Sikkerheden bliver selvfølgelig lavere, men er stadig bedre end med SP2.