Not all the cmdlets in the E2k10 SP1 beta Hosting Deployment have the -Organization switch?

This is a quick one. I saw some questions posted in the forum on this and I thought I should give a short blog on this.

For those has been playing with Exchange Server 2010 SP1 beta hosting deployment, I am quite sure by now you realize that you always need to be in the right tenant Organization context to get things done. In order to facilitate quick tenant organization context selection, Microsoft added a -Organization switch in a number of cmdlets. When you put that switch it, Exchange will know which tenant or configuration unit it is dealing with. For example, to create a new mailbox,

New-Mailbox -OrganizationAlpineSkiHouse -Name "John Doe" -UserPrincipalName

Or to get all mailbox in a tenant organization,

Get-Mailbox -OrganizationAlpineSkiHouse

However, you will very quickly realize that not all the cmdlets have that -Organization switch built-in. For example, Enable-Mailbox, Update-OfflineAddressBook, Remove-Mailbox, Update-GlobalAddressList or even Set-Mailbox and the list goes on. So, how do we use those cmdlets in the context of that tenant organization? 

Well, you have 2 options,

Option 1:  You use the full path like the following

Set-Mailbox -Identity " Exchange Hosted Organizations/AlpineSkiHouse/Johnc"-CustomAttribute1 "MyText"

Or Option 2: You can use Powershell piping (which is what I like to use) like the following,

Get-Mailbox -Organization AlpineSkiHouse -Identity johnc | Set-Mailbox -CustomAttribute1 "MyText"

Straightforward enough? You can do the same for (disabling and ) enabling mailbox, like the following,

Get-User -Organization AlpineSkiHouse -Identity Lisa | Enable-Mailbox

Or perform a Offline Address Book update,

Get-OfflineAddressBook -Organization AlpineSkiHouse "Default Offline Address Book" | Update-OfflineAddressBook

I am not sure if this will change when SP1 goes RTM, but in beta, it seems that, in SP1 beta, only cmdlets with New- and Get- will have the -Organization switch.

Comments (2)
  1. Ivo says:


    Do you know if there is any possibility to use the New-MailboxImportRequest Cmdlet in Exchange 2010 Hosting Mode? Because there is no -organization parameter, i get always the error "Couldn't connect to the target mailbox.".

    In the Get- Command of the same Cmdlet, the -organization parameter exists…?

    Thank you in advance.

    Greetings, Ivo

  2. aw says:

    hai, I just want to tell you that I am just very new to blogs and seriously loved this website. More than likely I’m planning to bookmark your blog post .
    You amazingly come with really good posts. Thanks a lot for sharing your blog Microsoft.

Comments are closed.

Skip to main content