Link to home
Start Free TrialLog in
Avatar of Kelly Garcia
Kelly GarciaFlag for United Kingdom of Great Britain and Northern Ireland

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:

$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
				}

Open in new window


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

Open in new window

Avatar of Amit
Amit
Flag of India image

Did you installed Exchange management tools on your remote system?
Avatar of Kelly Garcia

ASKER

no, how do I do this?
ASKER CERTIFIED SOLUTION
Avatar of Amit
Amit
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial