Exchange 2010 email policies

I had a conversation recently with a customer about email address policies in Exchange 2010. Here is the truth, straight from technet and verified in the lab.

1. You can NOT create an email address policy for a domain that is not an accepted domain. Exchange does care, even if Quinn doesn’t.

2. When you create an email address policy you have 3 choices, “don’t apply”,” apply Immediately” or “schedule the apply”.

a. Apply “Immediately” applies to all applicable recipients as soon as it can get to it.

b. Schedule the apply, applies after the scheduled time(starting at that time).

i. Remember  when applying in a larger environment it can take some time to apply.

c. “Do Not apply”, does not apply the policy at all.

3. When creating a new object the policy gets applied to that object(no matter how, or if the policy was ever applied before).

4. No matter what you’ve chosen when creating the policy the following applies

a. When you right click a policy and select apply, it gets applied (or you run Update-EmailAddressPolicy)

b. When the object changes, the policy gets applied

i. Note in my lab I simply updated the objects description and the policy was applied. Database moves, renames etc, all will force a policy update (on that object only).

So note that just like 2003 and 2007, if the policy is never applied manually or at policy creation, and an existing object never gets changed in any way, the policy will never be applied.

Uncheck the automatically update based on email address policy check box and a policy is NEVER applied to the object.

Exchange 2010 does NOT check occasionally or on some cycle and apply policies other than those instances stated above.

The “applied” column in the EMC is really of little value. It only shows whether or not the policy was ever manually applied. Manually applied only refers to objects that existed at the time of the application, which is unknown.

 

Also note I had an issue were a new policy got applied across the entire environment for what appeared to be no apparent reason.

My suggestion is to think about disabling the EmailAddressPolicyEnabled attribute when in doubt. Change it back slowly if you wish, after testing is complete.

 

Hope it helps

dw

Finding Exchange 2010 archive mailbox sizes.

With Exchange 2010 SP 1 the archive mailbox functionality is a little more usable.  This means we will need to discover ways to manage and report on these mailboxes.

So, “How do you see the size of the archive mailbox?”

Use get-mailboxstatistics mailboxname –archive.

To see all of the archive mailboxes Get-Mailbox -archive | Get-MailboxStatistics -archive |fl DisplayName, Total*

There .

I haven’t test this yet, but also found this. It’s a GUI based view of all Exchange  2010 mailboxes with mailbox sizes.

Finally, the ability to see mailbox sizes in one place!!!!!

http://gsexdev.blogspot.com/2010/03/mailbox-size-gui-exchange-2010-remote.html

Hope it Helps

dw

Upgrade Exchange 2010 RTM to Exchange 2010 Service Pack 1

This is an upgrade of an All in one Exchange 2010 RTM server to Exchange 2010 SP 1.

clip_image002

clip_image004

clip_image006

clip_image008

clip_image010

clip_image012

clip_image014

I was missing some updates. So I ran windows updates.

All prerequisites are here – http://technet.microsoft.com/en-us/library/bb691354.aspx

clip_image016

After windows updates it still needed these:

http://code.msdn.microsoft.com/KB982867.

(http://go.microsoft.com/fwlink/?linkid=3052&kbid=979744).

http://code.msdn.microsoft.com/KB983440.

(http://support.microsoft.com/kb/977020).

(http://support.microsoft.com/?kbid=979099).

After all that, it let me continue.

clip_image018

clip_image020

clip_image022

All green is good.

clip_image024

Hope it Helps

dw

Get Exchange Mailbox database sizes and sort so smallest is on top.

get-mailboxdatabase | foreach-object{select-object -inputobject $_ -property *,@{name=”MailboxDBSizeinGB”;expression={[math]::Round(((get-item (“\\” + $_.servername + “\” + $_.edbfilepath.pathname.replace(“:”,”$”))).length / 1GB),2)}}} | Sort-Object mailboxdbsizeinGB | format-table identity,mailboxdbsizeinGB –autosize

the output give a complete list of databases and puts the smallest one on top.

and if you want to simply double click a vbscript, here is a script “getdatabasesize.vbs” that calls the ps1. Its a little more user friendly. This is simply a vb script to call the powershell script.

Make sure you change the d:\ to the path its at.

code is

set objshell = createobject(“wscript.shell”)
vpsscript = “powershell.exe -noexit d:\getdatabasesize.ps1″
objshell.run vpsscript

Hope it Helps

dw

Create a shared mailbox in Microsoft Exchange 2010 and Add to OWA

To create a shared mailbox in Microsoft Exchange 2010 you’ll need to use the Exchange Management shell.

New-mailbox sharedTest –shared –userprincipalname Sharedtest@somedomain.com. Other settings are available for New-Mailbox – http://technet.microsoft.com/en-us/library/aa997663.aspx.

clip_image002

After its creation, notice the different icons for the shared mailbox

clip_image004

Right click the user (shared mailbox) and select “Manage Full Access Permissions

clip_image006

Add the users you wish to allow access.

clip_image008

clip_image010

clip_image012

Note this couls also be scripted with Add-MailboxPermission –Identity sharedtest –user “Lab\tu12” –AccessRights “Full Access”

Then you can log into Outlook Web access (or Outlook) and add them. Here is the process for OWA in Exchange 2010.

clip_image014

clip_image016

clip_image018

You can now see both Mailboxes from OWA.

Hope it Helps

dw

Uncheck the “Automatically update email addresses based on email address policy” on mail contacts.

So I want to uncheck (or disable) the “Automatically update email addresses based on email address policy” on mail contacts. I wanted to use powershell.

You’ll need the Quest Active Server role extensions. (http://www.quest.com/powershell/activeroles-server.aspx)

get-qadobject -IncludeAllProperties -sizelimit “0″  | where {$_.msExchPoliciesExcluded -like ” -and $_.type -like ‘contact’} | set-qadobject -ObjectAttributes  @{msExchPoliciesExcluded=’{26491CFC-9E50-4857-861B-0CB8DF22B5D7}’}

Hope it helps

dw

Using powershell to change email address suffixes

Home to atthedatacenter.com#This changes current email address to a different suffix. It assumes there is only one address with a different suffix.
Get-Mailbox -ResultSize Unlimited -Filter “emailaddresses -like ‘*mydomain.com” | foreach {
$user = $_.alias
$mssmtp = $_.emailaddresses -like ‘*myNewdomain.com’
$address = $mssmtp[0]
$newsmtp = $address -replace “smtp:”
set-mailbox -identity $user -primarySMTPaddress $newsmtp

Clear-Variable user
Clear-Variable mssmtp
Clear-Variable address
Clear-Variable newsmtp   
} #This pulls users from a list and changes the current email to the exact same with a different suffix.$r = (get-content “c:scriptsflipSMTP.txt”)
foreach ($line in $r) {Get-Mailbox -ResultSize Unlimited -Filter “alias -like ‘$line’ -and emailaddresses -like ‘*mydomain.com’” | foreach {
$user = $_.”alias”
#$mssmtp = $_.emailaddresses -like ‘*myNewdomain.com’
$address = $_.primarySMTPaddress
$newsmtp = $address -replace “smtp:”
$newsmtp = $address -replace “mydomain.com”,”myNewdomain.com”
set-mailbox -identity $user -primarySMTPaddress $newsmtpClear-Variable user
Clear-Variable mssmtp
Clear-Variable address
Clear-Variable newsmtp   
}}  Now for mail contacts:#This pulls users from a list and changes the current email to the exact same with a different suffix.$r = (get-content “c:scriptsflipSMTP.txt”)
foreach ($line in $r) {Get-mailcontact -ResultSize Unlimited -Filter “displayname -like ‘$line’ -and windowsemailAddress -like ‘*old.domain.com” | foreach {
$user = $_.”displayname”
$address = $_.primarySMTPaddress
$newsmtp = $address -replace “smtp:”
$newsmtp = $address -replace “old.domain.com”,”newdomain.com”
set-mailcontact -identity $user -primarySMTPaddress $newsmtp
set-mailcontact -identity $user -externalemailaddress $newsmtp
Clear-Variable user
#Clear-Variable mssmtp
Clear-Variable address
Clear-Variable newsmtp   
}}Hope it helpsdwHome to atthedatacenter.com

Adding IP addresses to Exchange Connectors with powershell

Home to atthedatacenter.com

I needed to add over 100 IP addresses to an internal relay connector. Here’s what I did.

Created a file with all of the addresses. One address per line.

$rc = Get-ReceiveConnector -Identity “tokp3hub31Internal Anonymous AppDevice Relay”
Get-Content c:scriptsIP.txt | foreach {$rc.RemoteIPRanges += “$_”}
$rc | Set-ReceiveConnector -ErrorAction SilentlyContinueThis will append to existing addresses.

I also wanted to run a report of what addresses where associated with the connector, but the output kept getting cut off. I figure out how to Prevent Truncation of Long Output in the exchange management shell. First run:

$FormatEnumerationLimit =-1

then the following will get the total list of IP addresses.

Get-ReceiveConnector “E2K7VInternal Anonymous AppDevice Relay” | fl remoteipranges > c:iplist.txt

Hope it helps

dw

Home to atthedatacenter.com

OpenManage on vSphere 4

 

1. From support.dell.com download OMI-SrvAdmin-Dell-Web-LX-620-677.esx40.tar.gz or the latestest caompatible version of openmanage.

2. Transfer OMI-SrvAdmin-Dell-Web-LX-620-677.esx40.tar.gz to the ESX server…preferably into the /tmp directory using FastSCP or winscp.

3. Using putty, run this command from that directory: tar –zxvf OMI-SrvAdmin-Dell-Web-LX-620-677.esx40.tar.gz

4. Cd into the linux/supportscripts directory

5. Run ./srvadmin-install.sh and follow the guided install.

 

#in the line com2sec notConfigUser default public

#change public to the string

# make sure #”smuxpeer .1.3.6.1.4.1.674.10892.1” #is at the end of the file

nano /etc/snmp/snmpd.conf

Run the following:

/sbin/service snmpd restart

srvadmin-services.sh restart

/usr/sbin/esxcfg-firewall -e snmpd

 

Home to atthedatacenter.com

Hope it helps

dw

error “Failed to Open File” when trying to perform a P2V with the VMware Converter tool

I was receiving an error “Failed to Open File” when trying to perform a  P2V with the VMware Converter tool.  It turned out not to actually be a file or permissions problem but a DNS resolution issue.  When Virtual Center passes the information to the Converter Agent on the host being migrated it sends the host name, not the IP address of the ESX server.  If the machine can’t resolve that name it will fail with the “Failed to Open File” error.

One way to fix this is with a host file. Add the vcenter server and esx host to the host file of the machine to be converted if a DNS server resolution is not an option for the client. You should always have a DNS server for your ESX environment so adding a record there if needed would work.

 

Home to atthedatacenter.com

Hope it helps

dw

Follow

Get every new post delivered to your Inbox.