PowerShell Remoting w/ Exchange 2010
Posted
by
pk.
on Server Fault
See other posts from Server Fault
or by pk.
Published on 2012-04-09T21:40:55Z
Indexed on
2012/04/09
23:34 UTC
Read the original article
Hit count: 894
exchange-2010
|powershell
I'm having difficulty running Exchange 2010 cmdlets through remote PowerShell sessions.
I start my local PowerShell session as Administrator and issue the following commands --
PS C:\Windows\system32> $mailcred = Get-Credential
PS C:\Windows\system32> $mailSession = New-PSSession -ComputerName MAILSRV -Credential $mailcred
PS C:\Windows\system32> Enter-PSSession $mailSession
[MAILSRV]: PS C:\Users\jdoe\Documents> Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
[MAILSRV]: PS C:\Users\jdoe\Documents> hostname
MAILSRV
[MAILSRV]: PS C:\Users\jdoe\Documents> Get-ExchangeServer
Value cannot be null.
Parameter name: serverSettings
+ CategoryInfo :
+ FullyQualifiedErrorId : System.ArgumentNullException,Microsoft.Exchange.Management.SystemConfigurationTasks.GetExchangeServer
[MAILSRV]: PS C:\Users\jdoe\Documents> get-mailbox
Value cannot be null.
Parameter name: serverSettings
+ CategoryInfo :
+ FullyQualifiedErrorId : System.ArgumentNullException,Microsoft.Exchange.Management.RecipientTasks.GetMailbox
As you can see, none of the Exchange cmdlets are working. What could be the issue?
© Server Fault or respective owner