Delay after creating a room before Set-CalendarProcessing functions

Status
Not open for further replies.
K

Karl Mitschke

I'm working on a script to allow our agency administrators to create a mailbox as a resource, and set calendar processing options.

The flow is:

Enable-Mailbox -identity <existing user> -Database <db> -Alias <samaccountname> -Room
Set-CalendarProcessing -AutomateProcessing:AutoAccept -DeleteSubject:$false -AddOrganizerToSubject:$false -RemovePrivateProperty:$false -Identity <existing user>

The Set-CalendarProcessing cmdlet fails with:
Cannot open mailbox /o=<Orginization>/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=<Server name>/cn=Microsoft System Attendant.
+ CategoryInfo : NotSpecified: (0:Int32) [Set-CalendarProcessing]
, MailboxUnavailableException
+ FullyQualifiedErrorId : EE2D9ADB,Microsoft.Exchange.Management.RecipientTasks.SetMailboxCalendarSettings

If I wait for up to 10 minutes, the Set-CalendarProcessing cmdlet works fine.

I've tried using the -DomainController paramater on both the Set-Mailbox and the Set-CalendarProcessing cmdlet with no help.

This is for a mailbox created on either an Exchange 2010 database, or a 2007 database.

What can I do to speed this up?

Karl

http://unlockpowershell.wordpress.com
-join(" 6B61726C6D69747363686B65406D742E6E6574" -split" (?<=\G.{2})" ,19|%{[char][int]" 0x$_" })
 
M

mjolinor

There's no way to speed it up enough that the mailbox will be ready in time for set-calendarprocessing cmdlet to run immediatly after the enable-mailbox is run.

When I provision user accounts, I use a get-mailbox/start-sleep loop after I enable the mailbox, and wait until I get a good return on get-mailbox before I try to do any additional setup on the mailbox.

[string](0..33|%{[char][int](46+(" 686552495351636652556262185355647068516270555358646562655775 0645570" ).substring(($_*2),2))})-replace " "
 
K

Karl Mitschke

Hello;

I should have mentioned that a Get-Mailbox returns valid data within our normal AD latency.

The Set-CalendarProcessing cmdlet fails for up to 10 minutes past the Get-Mailbox cmdlet returning the data.

I was using this loop, but don't want to wait, so I may end up telling customers that the Set-CalendarProcessing will have to be run as a seperate scheduled task:

Enable-Mailbox
Do
until (Get-CalendarProcessing <mailbox>)
Set-CalendarProcessing

I'd originally hhought it was AD latency, but I wrote the blog post on that ;)
http://unlockpowershell.wordpress.com/2010/01/08/powershell-dealing-with-active-directory-latency/

Thanks, though

Karl
http://unlockpowershell.wordpress.com
-join(" 6B61726C6D69747363686B65406D742E6E6574" -split" (?<=\G.{2})" ,19|%{[char][int]" 0x$_" })
 
M

mjolinor

Weird. There must be some additional latency in Exchange. Ten minutes seems like a long time to wait.

[string](0..33|%{[char][int](46+(" 686552495351636652556262185355647068516270555358646562655775 0645570" ).substring(($_*2),2))})-replace " "
 
J

Jeff lawrence

Karl,

Any luck with this issue - we are running into the exact issue in our environmnet (Takes around 10 minutes and it doesn't seem related to replication - we force a DC and replication is complete in 2-3 minutes)

There is some discussion in other forums that the mailbox hasn't initialized and created the calendar subfolder yet - but I see no mention of such a requirement in the help or in the many walk throughts, ex: http://msexchangeteam.com/archive/2007/05/14/438944.aspx

Jeff
 
K

Karl Mitschke

Jeff;

No change here.

We recently updated our 2010 severs to SP1, and we still have the issue.

On our recovery server, in a seperate domain (running on Hyper-V in a private network, with 1 Server 2008 DC, 1 Server 2008 running Exchange 2007, and one Server 2008 R2 running Exchange 2010) I get results from Get-CalendarProcessing within 1 second of mailbox creation.

I can alse run Set-CalendarProcessing within 1 second of mailbox creation

Sure wish I could do that in Production :)

I will test sending a mail message to the resource and then running Get-CalendarProcessing.

Karl

http://unlockpowershell.wordpress.com
-join(" 6B61726C6D69747363686B65406D742E6E6574" -split" (?<=\G.{2})" ,19|%{[char][int]" 0x$_" })
 
Status
Not open for further replies.
Top