Set-CASMailbox vs Set-Mailbox

Hey Guys

I was reading through some documentation on Set-CASMailbox and Set-Mailbox. One of the things I noticed (And maybe I am high) is that set-casmailbox can be used for setting the EMailAddress and the PrimarySMTPAddres. But of course so can Set-mailbox.

Set-CASMailbox

https://technet.microsoft.com/en-us/library/bb125264(v=exchg.150).aspx

Set-Mailbox

https://technet.microsoft.com/en-us/library/bb123981(v=exchg.150).aspx

The question I have is why? and when would I use Set-CASMAilbox vs Set-Mailbox. To set a users emailaddres or primarysmtpaddress?

Thanks,

R

September 12th, 2015 11:25pm

Hi Robert,

Set-CASMailbox cmdlet is used to configure client access settings on a mailbox
ex: pop, activesync, imap, mapi etc..

These things can be controlled only by Set-CASMailbox command

Set-Mailbox cmdlet is used to modify the settings of an existing mailbox in a DB and mailbox attribute  level 

Similary these settings can be controlled by Set-Mailbox level

Free Windows Admin Tool Kit Click here and download it now
September 13th, 2015 12:36am

Totally understood but if you look at the link for set-casmailbox that option is there. I don't understand why the same option is in 2 places. there must be a reason.
September 13th, 2015 1:23am

Totally understood but if you look at the link for set-casmailbox that option is there. I don't understand why the same option is in 2 places. there must be
Free Windows Admin Tool Kit Click here and download it now
September 13th, 2015 1:02pm

Ultimately these cmdlet are completely different however they do have similarities. As you have stated you can modify the EmailAddresses and PrimarySmtpAddress as well with both cmdlets. This gives you flexibility when you are working with scripts because when there is overlap with some of the cmdlets it can make it much easier to set "Highly Used Parameters" like PrimarySmtpAddress and EmailAddress using a single cmdlet.

This does not mean that those cmdlets are the same, they do have different meaning and features that the other does not.

Another example is being able to set the sAMAccountName using Set-Mailbox, Set-CASMailbox and you can also use the Active Directory cmdlet Set-ADUser to set this attribute.

This is why powershell is so flexible becuase you can get the same results using different methods.

This would be another reason why they carried this behavior with Set-Mailbox and Set-CASMailbox through 2007 - 2013.

Will.

September 13th, 2015 3:30pm

Ultimately these cmdlet are completely different however they do have similarities. As you have stated you can modify the EmailAddresses and PrimarySmtpAddress as well with both cmdlets. This gives you flexibility when you are working with scripts because when there is overlap with some of the cmdlets it can make it much easier to set "Highly Used Parameters" like PrimarySmtpAddress and EmailAddress using a single cmdlet.

This does not mean that those cmdlets are the same, they do have different meaning and features that the other does not.

Another example is being able to set the sAMAccountName using Set-Mailbox, Set-CASMailbox and you can also use the Active Directory cmdlet Set-ADUser to set this attribute.

This is why powershell is so flexible becuase you can get the same results using different methods.

This would be another reason why they carried this behavior with Set-Mailbox and Set-CASMailbox through 2007 - 2013.

Will.

Free Windows Admin Tool Kit Click here and download it now
September 13th, 2015 7:29pm

Awesome explanation by Will. Thanks for sharing
September 13th, 2015 11:40pm