Trying to get a list of mailboxes that a user does not have access to


hi

i'm trying list of mailboxes user not have access to, command work returns every permission every mailbox user not have access to. 

get-mailbox -resultsize unlimited | get-mailboxpermission | {($_.user -notlike "domain\user")} | ft identity

i suspect above need lot of restructuring work, know works when issuing "($_.user -like "domain\user")" think answer filter output of get-mailbox command, i'm wanting mailboxes rather permissions, i'm not quite sure how structure this.

does have ideas?

 

cheers

 

dave

get-mailbox  -resultsize unlimited | where-object {(!(get-mailboxpermission -identity $_.samaccountname -user "youdomainname\username"))}  


correct want check mailboxes for 1 user doesn't have rights?

 

 




Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

server manager error: ADAM.events.xml could not be enumerated.

Cannot access Anywhere Access using domain name?

WMI Failure: Unable to update Local Resource Group