Big thanks to Nikki and Michael.  I just couldn't get this to work in the time 
they were allowing me.  The good side is that I was able to pick out stuff to 
refine my search and came up with another script, but it only did delegate 
permissions on the Inbox.  I added a few lines that would pick up the calendar 
and contacts and it worked.  It's probably not efficient, not very pretty, but 
I think it gives them what they want and I can get back to what I was working 
on!  If anyone's interested:

$AllUsers = get-mailbox * -resultsize:unlimited 
ForEach ($alias in $AllUsers)
{
$Mailbox = ""+ $alias.Name +":\Inbox"
$Contacts = ""+ $alias.Name +":\Contacts"
$Calendar = ""+ $alias.Name +":\Calendar"
get-mailboxfolderpermission -identity $Mailbox | Select User, FolderName, 
AccessRights | ft $mailbox, user, foldername, accessrights >>delegates.csv 
get-mailboxfolderpermission -identity $Contacts | Select User, FolderName, 
AccessRights | ft $mailbox, user, foldername, accessrights >>delegates.csv
get-mailboxfolderpermission -identity $Calendar | Select User, FolderName, 
AccessRights | ft $mailbox, user, foldername, accessrights >>delegates.csv
}

-Paul

-----Original Message-----
From: Michael B. Smith [mailto:mich...@smithcons.com] 
Sent: Tuesday, June 12, 2012 10:46 AM
To: MS-Exchange Admin Issues
Subject: RE: Calendar permissions vs Delegate vs Send on behalf of

That particular post is #5 in a series. He left some stuff out. :-P

$MailboxName should just be the primary SMTP address of a user, I believe.

The rest of it comes from here:

http://gsexdev.blogspot.com.au/search/label/EWS%20Managed%20API#!/2012/01/ews-managed-api-and-powershell-how-to.html


-----Original Message-----
From: Maglinger, Paul [mailto:pmaglin...@scvl.com] 
Sent: Tuesday, June 12, 2012 11:36 AM
To: MS-Exchange Admin Issues
Subject: RE: Calendar permissions vs Delegate vs Send on behalf of

So I'm trying to work through this and understand what's going on...
I''ve used Get- statements before in order to put values into variables, but I 
don't see anything like that here.  How is it populating $MailboxName?

-----Original Message-----
From: Maglinger, Paul [mailto:pmaglin...@scvl.com] 
Sent: Tuesday, June 12, 2012 9:43 AM
To: MS-Exchange Admin Issues
Subject: RE: Calendar permissions vs Delegate vs Send on behalf of

Thanks Michael.  It was something extra in there that didn't belong.  Now when 
I run it I get this:

You cannot call a method on a null-valued expression.
At C:\downloads\DelegateReport.ps1:2 char:35
+ $delegates = $service.getdelegates <<<< ($MailboxName,$true)
    + CategoryInfo          : InvalidOperation: (getdelegates:String) [], 
RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

I'm not a programmer, nor do I play one on TV, but it looks like I'm rapidly 
going to become one.  Any insight would be greatly appreciated.

Script is below:

$rptCollection = @() 
$delegates = $service.getdelegates($MailboxName,$true)  
foreach($Delegate in $delegates.DelegateUserResponses){  
    $rptObj = "" | select 
EmailAddress,Inbox,Calendar,Contacts,Tasks,Notes,Journal,MeetingMessages,ViewPrivateItems
  
    $rptObj.EmailAddress = $Delegate.DelegateUser.UserId.PrimarySmtpAddress  
    $rptObj.Inbox = 
$Delegate.DelegateUser.Permissions.InboxFolderPermissionLevel  
    $rptObj.Calendar = 
$Delegate.DelegateUser.Permissions.CalendarFolderPermissionLevel  
    $rptObj.Contacts = 
$Delegate.DelegateUser.Permissions.ContactsFolderPermissionLevel  
    $rptObj.Tasks = 
$Delegate.DelegateUser.Permissions.TasksFolderPermissionLevel  
    $rptObj.Notes = 
$Delegate.DelegateUser.Permissions.NotesFolderPermissionLevel  
    $rptObj.Journal = 
$Delegate.DelegateUser.Permissions.JournalFolderPermissionLevel  
    $rptObj.ViewPrivateItems = $Delegate.DelegateUser.ViewPrivateItems  
    $rptObj.MeetingMessages = 
$Delegate.DelegateUser.ReceiveCopiesOfMeetingMessages  
    $rptCollection += $rptObj  
}  
  
$tableStyle = @" 
<style> 
BODY{background-color:white;} 
TABLE{border-width: 1px; 
  border-style: solid; 
  border-color: black; 
  border-collapse: collapse; 
} 
TH{border-width: 1px; 
  padding: 10px; 
  border-style: solid; 
  border-color: black; 
  background-color:#66CCCC 
} 
TD{border-width: 1px; 
  padding: 2px; 
  border-style: solid; 
  border-color: black; 
  background-color:white 
} 
</style> 
"@  
    
$body = @" 
<p style="font-size:25px;family:calibri;color:#ff9100">  
$TableHeader  
</p>  
"@  
  
$rptCollection | ConvertTo-HTML -head $tableStyle | Out-File 
c:\downloads\delgateReport.html  


-----Original Message-----
From: Michael B. Smith [mailto:mich...@smithcons.com] 
Sent: Tuesday, June 12, 2012 8:45 AM
To: MS-Exchange Admin Issues
Subject: RE: Calendar permissions vs Delegate vs Send on behalf of

That generally indicates a missing '$' on a variable name.

Check your copy-n-paste.

-----Original Message-----
From: Maglinger, Paul [mailto:pmaglin...@scvl.com] 
Sent: Tuesday, June 12, 2012 9:39 AM
To: MS-Exchange Admin Issues
Subject: RE: Calendar permissions vs Delegate vs Send on behalf of

Thanks!  This looks like what I'm looking for, but I'm getting an unexpected 
token 'rptCollection' in expression or statement error when I try to run it.

-----Original Message-----
From: Nikki Peterson - OETX [mailto:nikkipeter...@mail.maricopa.gov] 
Sent: Monday, June 11, 2012 6:05 PM
To: MS-Exchange Admin Issues
Subject: RE: Calendar permissions vs Delegate vs Send on behalf of

Glen's Exchange Dev Blog:

http://gsexdev.blogspot.com.au/2012/03/ews-managed-api-and-powershell-how-to.html#!/2012/03/ews-managed-api-and-powershell-how-to.html

Snipped from Glen's page(EWS Managed API and Powershell How-To Series Part 5 
Delegate Operations):

Reporting on Delegates

One of the more useful things to do with delegates is produce a report of the 
currently configured delegates on a mailbox . This can come in use if you want 
to send a report to a user whom may have no idea who currently has access to 
their mailbox. Here's a sample of producing a HTML report of the delegates on a 
mailbox...


Nikki Peterson

-----Original Message-----
From: Maglinger, Paul [mailto:pmaglin...@scvl.com] 
Sent: Monday, June 11, 2012 2:52 PM
To: MS-Exchange Admin Issues
Subject: RE: Calendar permissions vs Delegate vs Send on behalf of

So continuing on working through this, I have been able to bring up a list of 
delegates and a list of mailbox permissions.  It now becomes necessary to bring 
up a list of delegate permissions.  In other words, I've now been asked for a 
list of who the delegates are, what folders they have access to, and what role 
(editor, reviewer, etc) they have been assigned.  I haven't been able to find a 
powershell that will do all that.  Any thoughts on this?

-Paul

-----Original Message-----
From: Maglinger, Paul [mailto:pmaglin...@scvl.com] 
Sent: Friday, June 08, 2012 9:56 AM
To: MS-Exchange Admin Issues
Subject: RE: Calendar permissions vs Delegate vs Send on behalf of

I've found where Delegates automatically get "Send on Behalf" permissions.  The 
information I find says that Delegates "can" get meeting requests.  Does that 
really mean that Delegates "will" get meeting requests?  Does having "Send on 
Behalf" permissions automatically send meeting requests to that person 
regardless of mailbox folder permissions?

-----Original Message-----
From: Maglinger, Paul [mailto:pmaglin...@scvl.com] 
Sent: Wednesday, June 06, 2012 5:58 PM
To: MS-Exchange Admin Issues
Subject: RE: Calendar permissions vs Delegate vs Send on behalf of

I have gone so far as to create test accounts with the same delegate and 
permissions settings and can't duplicate this issue.  I can send a meeting 
request to User B and get the OOO from User C.  I checked for server-side 
rules, but is it possible that this is a client-side rule that I cannot see 
unless I am logged into User B's workstation?  And if so, wouldn't that 
typically need to have User C as a contact in User B's Contacts?

-----Original Message-----
From: Maglinger, Paul [mailto:pmaglin...@scvl.com] 
Sent: Wednesday, June 06, 2012 10:13 AM
To: MS-Exchange Admin Issues
Subject: RE: Calendar permissions vs Delegate vs Send on behalf of

Forgot to mention that I had checked the rules and there wasn't anything there. 
 If nothing else I'm trying to get confirmation that if someone is a delegate 
as stated below, that they would or could receive meeting requests.  

-----Original Message-----
From: Kennedy, Jim [mailto:kennedy...@elyriaschools.org] 
Sent: Wednesday, June 06, 2012 9:26 AM
To: MS-Exchange Admin Issues
Subject: RE: Calendar permissions vs Delegate vs Send on behalf of


Check for a rule in User B's Outlook. If that isn't it then I bet it is the 
delegate even though they are denied on the Calendar. It seems it is always 
either a rule or delegation.

-----Original Message-----
From: Maglinger, Paul [mailto:pmaglin...@scvl.com] 
Sent: Wednesday, June 06, 2012 10:14 AM
To: MS-Exchange Admin Issues
Subject: Calendar permissions vs Delegate vs Send on behalf of

User A sent a meeting request to User B and got an OOO reply from User C.  User 
C used to be User B's Admin Assistant but no longer.  User C is still set up as 
a Delegate in Outlook, but as an Editor for the Tasks, Inbox, Contacts, and 
Notes (Calendar permissions are set to "None" and as such the option for the 
"Delegate to receive copies of meeting related messages sent to me" is greyed 
out and unchecked).  Checking the Calendar folder permissions, User C is not 
listed there at all.  So why is User C getting the meeting requests? 

-Paul

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist


---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe exchangelist

Reply via email to