Powershell and mailbox attribute visibility
Hello all I wanted to check whether I have this right or not. I dont believe that it is possible to script visibility to the following attributes that exist within the properties of a mailbox: Blocked senders (junk email setting) Delegation setting (a users had added a delegate and granted them Editors rights etc) I have been trying for 20 minutes now to find out how to see these attributes within powershell but I dont think i can, certainly not without FULL mailbox access but even then I dont think it is possible. I know that if the "GrantsendOnBehalfOf" attribute has a name within it then at least Delegation has been set, but not the actual permissions. Can anyone contradict me (MFC MAPI might allow visibility of these values I supose) Tom
April 22nd, 2010 6:31pm

Hi, Can u elaborate what u r trying to do or get, may be we can then help you in better way? There is also a property RejectMessagesFrom in an exchange mailbox. Regards,Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com
Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2010 6:47pm

Hi Laeeq I am keen to provide an improved interface (They already have one which we designed and want to expand upon) for an external helpdesk group so that they can manage more aspects of User mailboxes. A couple of the things they would like access to are: 1) A "visual" of the delegation rights that users have set (Using the Delegates feaure in Outlook for instance) 2) Visibility of the email addresses and other Junk Email flists (which are ediable in OWA and therefore not a client-side setting) that users have set. I am struggling to figure out how to use powershell to display this data because the interface that we created works with Powershell in the background and ASPX as the interface. Tom
April 23rd, 2010 6:20pm

This should get the delegates using the EWS managed API. You'll need to plug in the CAS server name, and smtp address of the mailbox you want to check. $MailboxName = "<user primary smtp address>" $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) $uri=[system.URI] “https://<CAS SERVER>/ews/exchange.asmx” $service.Url = $uri #$service.TraceEnabled = $true $delegates = $service.getdelegates($mailboxname,$true) foreach ($del in $delegates){ $del.delegateuserresponses[0].delegateuser.userid.displayname $del.delegateuserresponses[0].delegateuser.userid.sid $del.delegateuserresponses[0].delegateuser.userid.primarysmtpaddress $del.delegateuserresponses[0].delegateuser.permissions }
Free Windows Admin Tool Kit Click here and download it now
April 23rd, 2010 6:45pm

For some reason, when I run this script I'm getting only one person listed when i have 2 delegates in Outlook. Any recommendations as to why? is the foreach loop not working correctly? Thanks.
July 15th, 2010 12:22am

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

Other recent topics Other recent topics