List Get-MailboxFolderPermission (and export to a file)
Good Morning!
I'm using the below script from this thread:
http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/d8ffef98-cd5f-4ce9-94cf-47cca32961b1/#7bd9aa52-1afd-490b-898c-dbd7aeca3a22 in Exchange 2010, however it throws the following error:
The specified mailbox "@{Alias=USER}" doesn't exist.
+ CategoryInfo : NotSpecified: (0:Int32)
[Get-MailboxFolderPermission], ManagementObjectNotFoundException
+ FullyQualifiedErrorId :
DDDCC6C6,Microsoft.Exchange.Management.StoreTasks.GetMailboxFolderPermission
It seems like instead of just picking the alias, it picks "alias=the alias" so it doesn't work correctly.
Is there a fix for this? I had other notions of maybe using a CSV file with all the mailbox names under a heading called displayName but thinking through it is a bit much for my amateur mind on Monday morning.
Thanks in advance
Paddy
$AllUsers = get-mailbox * | select Alias
ForEach ($User in $AllUsers) {
$Mailbox = ""+ $User +":\Inbox"
$Text0 = "---"
$Text1 = ""
$Text2 = "AccessRights For Mailbox: "+ $User +""
$Text3 = ""
$Text4 = "---"
$Text5 = ""
$Text0 | Out-File c:\Inbox_Permissions.txt -append
$Text1 | Out-File c:\Inbox_Permissions.txt -append
$Text2 | Out-File c:\Inbox_Permissions.txt -append
$Text3 | Out-File c:\Inbox_Permissions.txt -append
$Text4 | Out-File c:\Inbox_Permissions.txt -append
get-mailboxfolderpermission -identity $Mailbox | Select User, FolderName, AccessRights | Out-File c:\Inbox_Permissions.txt -append
$Text5 | Out-File c:\Inbox_Permissions.txt -append
}
May 14th, 2012 4:14am
Not only does it work now, but I greatly appreciate that you explained it to me!
Thank you.
Free Windows Admin Tool Kit Click here and download it now
May 14th, 2012 5:59am
If with the change this script does not work for me and I get the following error condition, can anybody help its really urgent?
The specified mailbox "JoKeller\inbox" doesn't exist.
+ CategoryInfo : NotSpecified: (0:Int32) [Get-MailboxFolderPermission], ManagementObjectNotFoundException
+ FullyQualifiedErrorId : 61B39A5A,Microsoft.Exchange.Management.StoreTasks.GetMailboxFolderPermission
June 30th, 2012 1:39pm
If with the change this script does not work for me and I get the following error condition, can anybody help its really urgent?
The specified mailbox "JoKeller\inbox" doesn't exist.
+ CategoryInfo : NotSpecified: (0:Int32) [Get-MailboxFolderPermission], ManagementObjectNotFoundException
+ FullyQualifiedErrorId : 61B39A5A,Microsoft.Exchange.Management.StoreTasks.GetMailboxFolderPermission
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2012 1:39pm