troubleshooting Question

Remote Powershell Issue

Avatar of Kelly Garcia
Kelly GarciaFlag for United Kingdom of Great Britain and Northern Ireland asked on
3 Comments1 Solution283 ViewsLast Modified:
HI All,

When I log into the exchange 2010 server and run this code on the exchange management shell, it works fine. However when I remote into the exchange server via powershell I get an error.

Below is the code:

$GMSize = foreach ($m in get-mailbox -ResultSize Unlimited )
					Get-MailboxStatistics $m | where {$_.TotalItemSize -ge "4GB"} | Select-Object @{Name="DisplayName";Expression={Get-Mailbox $m | select -ExpandProperty SamAccountName}}, TotalItemSize, ItemCount, Database, TotalDeletedItemSize,DeletedItemCount, LastLoggedOnUserAccount, LastLogonTime, LastLogoffTime

this is the error I get:

Cannot process argument transformation on parameter 'Identity'. Cannot convert the "Alexandru Gavris" value of type
"Deserialized.Microsoft.Exchange.Data.Directory.Management.Mailbox" to type
    + CategoryInfo          : InvalidData: (:) [Get-MailboxStatistics], ParameterBindin...mationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Get-MailboxStatistics
    + PSComputerName        :
IT Architect
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros