Kelly Garcia
asked on
Remote Powershell Issue
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:
this is the error I get:
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
"Microsoft.Exchange.Configuration.Tasks.GeneralMailboxOrMailUserIdParameter".
+ CategoryInfo : InvalidData: (:) [Get-MailboxStatistics], ParameterBindin...mationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Get-MailboxStatistics
+ PSComputerName : thomsons-mail01.t-bx.com
Did you installed Exchange management tools on your remote system?
ASKER
no, how do I do this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.