enable automatilly update e-mail adresses based on email policy
Hi ,
i like any powershell or script in vbscript to enable in all mailbox the check "enable automatilly update e-mail adresses based on email policy" in "email-adresses".
we have tons of user whitout the check enable.
i find a script in google but this fail :
> This script clear the contents os "msExchPoliciesExcluded" property for all
> AD. This set the checkbox ON.
>
> 1 - Change the domain name at line 07.
> 2 - Please try in lab first !!!!
>
> ++++++++++++++++++++++++++++++++++++++++++++++++
> Const ADS_PROPERTY_CLEAR = 1
> Set objConnection = CreateObject("ADODB.Connection")
> objConnection.Open "Provider=ADsDSOObject;"
> Set objCommand = CreateObject("ADODB.Command")
> objCommand.ActiveConnection = objConnection
> objCommand.CommandText = "<GC://dc=dom3,dc=dom2,dc=dom1,dc=pre>;(objectCategory=User)"
> & ";distinguishedName;subtree"
> Set objRecordSet = objCommand.Execute
>
> intCounter = 0
> While Not objRecordset.EOF
>
> usuario = objRecordset.Fields("distinguishedName")
>
>
> Set objUser = GetObject ("LDAP://" & usuario & "")
> objUser.PutEx ADS_PROPERTY_CLEAR, "msExchPoliciesExcluded" , 0
> objUser.SetInfo
>
> objRecordset.MoveNext
> Wend
>
> objConnection.Close
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++
Thanks in advance.
mcse 200x + mesaging 2000 2003 2007 2010
January 20th, 2012 8:21am
This Powershell commandlet will do the trick:
Get-Mailbox -Filter {EmailAddressPolicyEnabled -eq $false} | Set-Mailbox -EmailAddressPolicyEnabled:$true
Cheers,
Lain
Free Windows Admin Tool Kit Click here and download it now
January 20th, 2012 8:36am
Hi
this should be able to get you what you want
get-mailboxdatabase -identity "databasename" | get-mailbox |set-mailbox -EmailAddressPolicyEnabled:$trueRegards Herbert Zimbizi
January 20th, 2012 8:50am
Thanks Lain , great response.mcse 200x + mesaging 2000 2003 2007 2010
Free Windows Admin Tool Kit Click here and download it now
January 23rd, 2012 3:34am