Determining mailbox delegates
does anybody know if a powershell command exists to check delegates and mail forwarding settings for all user mailboxes. I found something for resource mailboxes but when trying that command for user mailboxes it doesn't give the delegates output. thx, Stany.
March 18th, 2010 2:00pm

Hi there,I don't believe you can get mailbox delegates, however for your other request:Get-Mailbox |Select DisplayName, ForwardingADdress, GrantSendOnBehalfTo | Export-CSV x:\yourfile.csvYou can pull Full Mailbox Access and Send/Recieve As rights also:Get-Mailbox |Get-MailboxPermission |Select, Identity,User,AccessRights,DenyGet-Mailbox |Get-ADPermission |Select, Identity,User,ExtendedRightsOliver Oliver Moazzezi | Exchange MVP, MCSA:M, MCTS:Exchange 2010, BA (Hons) Anim | http://www.exchange2007.com | http://www.exchange2010.com | http://www.cobweb.com |
Free Windows Admin Tool Kit Click here and download it now
March 18th, 2010 3:08pm

You can use the EWS Managed API to get the delegates.Use the primary smtp address of the mailbox you want to check in $MailboxName, and plug your CAS server name into $uri.$MailboxName = "<smtp address of mailbox to check>"$uri=[system.URI] “https://<CAS server name>/ews/exchange.asmx” $dllpath = "C:\Program Files\Microsoft\Exchange\Web Services\1.0\Microsoft.Exchange.WebServices.dll"[void][Reflection.Assembly]::LoadFile($dllpath) $fcPropset = new-object Microsoft.Exchange.WebServices.Data.PropertySet`([Microsoft.Exchange.WebServices.Data.BasePropertySet]::FirstClassProperties) $service = new-object Microsoft.Exchange.WebServices.Data.ExchangeService`([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2007_SP1)$service.Url = $uri #$service.TraceEnabled = $true $del = $service.getdelegates($mailboxname,$true) $del.delegateuserresponses |% { $_.delegateuser.userid.displayname$_.delegateuser.userid.sid$_.delegateuser.userid.primarysmtpaddress$_.delegateuser.permissions }
March 18th, 2010 4:20pm

This doesn't seem to work against a 2010 cas server with a 2007 mailbox. I get the following error Syntax?? Unexpected token ')' in expression or statement. At C:\Users\exadmin\Desktop\get_delegate.ps1:12 char:151 + $fcPropset = new-object Microsoft.Exchange.WebServices.Data.PropertySet`([Microsoft.Exchange.WebServices.Data.BasePropert ySet]::FirstClassProperties) <<<< + CategoryInfo : ParserError: ():String) [], ParseException + FullyQualifiedErrorId : UnexpectedTokend
Free Windows Admin Tool Kit Click here and download it now
April 27th, 2012 3:06pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics