pramod1
asked on
exchange, powershell
I need to run this with result size unlimited? wher e do I add result size unlimied
Get-Mailbox | Get-MailboxPermission | where {$_.user.tostring() -ne "NT AUTHORITY\SELF" -and $_.IsInherited -eq $false}
Get-Mailbox | Get-MailboxPermission | where {$_.user.tostring() -ne "NT AUTHORITY\SELF" -and $_.IsInherited -eq $false}
Get-Mailbox -ResultSize Unlimited | Get-MailboxPermission | where {$_.user.tostring() -ne "NT AUTHORITY\SELF" -and $_.IsInherited -eq $false}
ASKER
wondered if there is
a way to get the Access Rights field to represent the level access (I.E Editor,
Reviewer or Full access)?
Get-Mailbox -Resultsize Unlimited | %{Get-MailboxPermission $_.Alias | where {$_.user.tostring() -ne "NT AUTHORITY\SELF" -and $_.IsInherited -eq $false} | Select Identity,User,Accessrights | Export-csv c:\temp\mailboxpermissions.csv -notypeinformation
Pramod- going forward try to let us know exactly what your requirements are in your initial inquiry
ASKER
sorry sir, appreciate your kind help
ASKER
Then you can't use the -ResultSize Unlimited
You'd need to filter them out
You'd need to filter them out
#Mailboxes
$AllMailboxes = Get-Mailbox -ResultSize Unlimited | select Alias,User,IsInherited
@AllPermissions=@()
foreach($mailbox in $AllMailboxes){
$AllPermissions+=Get-MailboxPermission $mailbox.Alias | where {$mailbox.user.tostring() -ne "NT AUTHORITY\SELF" -and $mailbox.IsInherited -eq $false} | Select Identity,User,Accessrights
}
$AllPermissions | Export-csv c:\temp\mailboxpermissions.csv -notypeinformation
ASKER
You're not doing the code I posted :) The line breaks are there for a reason buddy
if you want to use it as a single block of code then use ";" at the end of each line.
if you want to use it as a single block of code then use ";" at the end of each line.
ASKER
thanks ok I am trying this now, let me know
Get-Mailbox -resultsize unlimited | Get-MailboxPermission | where {$_.user.tostring() -ne "NT A
UTHORITY\SELF" -and $_.IsInherited -eq $false} | Select Identity,User,@{Name='AccessRights';Expression={[string]::join('
, ', $_.AccessRights)}} | Export-Csv c:\temp\mailboxpermissions.csv -NoTypeInformation
Get-Mailbox -resultsize unlimited | Get-MailboxPermission | where {$_.user.tostring() -ne "NT A
UTHORITY\SELF" -and $_.IsInherited -eq $false} | Select Identity,User,@{Name='AccessRights';Expression={[string]::join('
, ', $_.AccessRights)}} | Export-Csv c:\temp\mailboxpermissions.csv -NoTypeInformation
ASKER
Ok I just pasted as is what u sent
It just took lines as of now waiting for cursor to move
It just took lines as of now waiting for cursor to move
pramod- did you run this ?
Get-Mailbox -Resultsize Unlimited | %{Get-MailboxPermission $_.Alias | where {$_.user.tostring() -ne "NT AUTHORITY\SELF" -and $_.IsInherited -eq $false} | Select Identity,User,Accessrights | Export-csv c:\temp\mailboxpermissions .csv -notypeinformation
Get-Mailbox -Resultsize Unlimited | %{Get-MailboxPermission $_.Alias | where {$_.user.tostring() -ne "NT AUTHORITY\SELF" -and $_.IsInherited -eq $false} | Select Identity,User,Accessrights
ASKER
Yrs I pasted the error in this thread above
what you pasted does not show my command for me to verify if it is what I sent you.
ASKER
Just a sec
ASKER
I am getting above, did you miss anything in command line?
I missed on bracket...go for it again below
Get-Mailbox -Resultsize Unlimited | %{Get-MailboxPermission $_.Alias | where {$_.user.tostring() -ne "NT AUTHORITY\SELF" -and $_.IsInherited -eq $false}} | Select Identity,User,Accessrights | Export-csv c:\temp\mailboxpermissions .csv -notypeinformation
Get-Mailbox -Resultsize Unlimited | %{Get-MailboxPermission $_.Alias | where {$_.user.tostring() -ne "NT AUTHORITY\SELF" -and $_.IsInherited -eq $false}} | Select Identity,User,Accessrights
ASKER
ok running now, thanks
ASKER
Fox:
it did give the results under identity , user rights but wish we could see what exact permissions were granted, is there any way to do that? it just gives below for all identities, user rights.
it did give the results under identity , user rights but wish we could see what exact permissions were granted, is there any way to do that? it just gives below for all identities, user rights.
AccessRights |
Microsoft.Exchange.Management.RecipientTasks.MailboxRights[] |
Please paste one line of output so I can see
Did you run this in Exchange management shell?
ASKER
yes sir
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
running , will update once done
ASKER
it worked, thanks for all help