Hi,
I want to monitor exchange server 2007 using powershell scripts. Here are the scripts which I have used for that.
$secpasswd = ConvertTo-SecureString "password" -AsPlainText -Force
$mycreds = New-object -typename System.Management.Automation.PSCredential("domain\Admin",
$secpasswd)
Enter-pssession 192.168.1.153 –credential $mycreds
$server='client-pc-1.domain.com';$pwd= convertto-securestring 'password' -asplaintext -force;
$cred=new-object -typename System.Management.Automation.PSCredential -argumentlist 'Admin',
$pwd; invoke-command -computername $server -credential $cred -scriptblock {Add-PSSnapin
Microsoft.Exchange.Management.PowerShell.Admin; Get-ExchangeServer}
But I have landed in the following Exception
Processing data from remote server 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) [], PSRemotingTransportException + FullyQualifiedErrorId : JobFailure
Can anyone please help me to solve this?
Thanks
Sebastian