Click here to Skip to main content
15,877,859 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,

I was trying to execute following exchange server 2007 (powershell) command.
$server='';$pwd= convertto-securestring '123' -asplaintext -force;$cred=new-object -typename System.Management.Automation.PSCredential -argumentlist 'Administrator',$pwd; invoke-command -computername $server -credential $cred -scriptblock {Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin; get-mailbox Administrator}

But landed in the following exception...

Processing data for a remote command failed with the following error message: The WSMan provider host process did not return a proper response.  
A provider in the host process may have behaved improperly. For more information, see the about_Remote_Troubleshooting Help topic.
    + CategoryInfo             : OperationStopped:                                                    
                                 System.Manageme...pressionSyncJob:PSInvokeExpressionSyncJob) [],
    + FullyQualifiedErrorId    : JobFailure

I have tried it in both powershell 1.0 & 2.0

Any help on this would be great.

Updated 4-Apr-13 21:09pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900