jcneil4
asked on
powershell script for exchange
Need some help with this
We use exchange online with office 365 I need to verify that a particular user has fullaccess permission on every mailbox. I can see what mailboxes he has access to with this:
Get-MailBox | Get-MailboxPermission -User "user@domain.com" | export-csv c:\temp\results.csv
What I need however is the opposite, I need to see what mailboxes he doesn't have access to.
Thanks!
We use exchange online with office 365 I need to verify that a particular user has fullaccess permission on every mailbox. I can see what mailboxes he has access to with this:
Get-MailBox | Get-MailboxPermission -User "user@domain.com" | export-csv c:\temp\results.csv
What I need however is the opposite, I need to see what mailboxes he doesn't have access to.
Thanks!
ASKER
Thanks when I run it returns this error for each:
Cannot process argument transformation on parameter 'Identity'. Cannot convert value "smith, Mike" to type
"Microsoft.Exchange.Config uration.Ta sks.Mailbo xIdParamet er". Error: "Cannot convert hashtable to an object of the following type:
Microsoft.Exchange.Configu ration.Tas ks.Mailbox IdParamete r. Hashtable-to-Object conversion is not supported in restricted language mode or
a Data section."
+ CategoryInfo : InvalidData: (:) [Get-MailboxPermission], ParameterBindin...mationEx ception
+ FullyQualifiedErrorId : ParameterArgumentTransform ationError ,Get-Mailb oxPermissi on
+ PSComputerName : outlook.office365.com
Cannot process argument transformation on parameter 'Identity'. Cannot convert value "smith, Mike" to type
"Microsoft.Exchange.Config
Microsoft.Exchange.Configu
a Data section."
+ CategoryInfo : InvalidData: (:) [Get-MailboxPermission], ParameterBindin...mationEx
+ FullyQualifiedErrorId : ParameterArgumentTransform
+ PSComputerName : outlook.office365.com
Has to be a O365 issue, because it works with my MSX2007.
Let's try by being more specific:
Let's try by being more specific:
get-mailbox | % { if (Get-MailboxPermission -Identity $_,Identity -User user@domain.com) {} else { $_ }}
ASKER
Actually tried that already! Doesn't work-
new error:
Cannot process argument transformation on parameter 'Identity'. Cannot convert the "System.Collections.ArrayL ist" value of type
"System.Collections.ArrayL ist" to type "Microsoft.Exchange.Config uration.Ta sks.Mailbo xIdParamet er".
+ CategoryInfo : InvalidData: (:) [Get-MailboxPermission], ParameterBindin...mationEx ception
+ FullyQualifiedErrorId : ParameterArgumentTransform ationError ,Get-Mailb oxPermissi on
+ PSComputerName : outlook.office365.com
new error:
Cannot process argument transformation on parameter 'Identity'. Cannot convert the "System.Collections.ArrayL
"System.Collections.ArrayL
+ CategoryInfo : InvalidData: (:) [Get-MailboxPermission], ParameterBindin...mationEx
+ FullyQualifiedErrorId : ParameterArgumentTransform
+ PSComputerName : outlook.office365.com
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
You are the man! Thanks!
Open in new window