Here i create a new session and run the poweshell cmdlets in that session,
Cmdlets,
$s=New-PSSession -ComputerName "Name" [Here the session gets created]
invoke-command -Session '$s- scriptblock {Get-Mailbox adminuser} [Here the error occurs]
Error:
Value cannot be null.
Parameter name: serverSettings
+ CategoryInfo : NotSpecified: (:) [Get-Mailbox], ArgumentNullException
+ FullyQualifiedErrorId : System.ArgumentNullException,Microsoft.Exchange.Management.RecipientTasks.GetMailbox.
Any body knows y this kind of error occurs????Thanks a lot..........