Execute Exchange 2010 Cmdlets via Remote SSH Powershell
Hi everybody, I'm connecting to a 2008R2 Server with Exchange 2010 installed on it using SSH. I'm able to run normal commands like get-date and stuff like that. But I can't run the exchange cmdlets like get-mailbox. So I tried adding the snaping via $profile to the default profile. Now when I open the normal powershell I'm able to run also the exchange cmdlets. But when I'm connecting with SSH (I have to use SSH because I'm connection from a BlackBerry, since I didn't find a free app that's capable of doing that) I only can run the basic cmdlets - no exchange stuff... I get this error: http://www.imgbox.de/show/img/PiozuxfAmP.jpg It says somethin like this: Active Directory-Error 0x80072030 When looking for a domain controller in the domain XY no such object could be found. There are no firewalls or other restrictions I'm aware of. Thanks for any help!
June 18th, 2010 8:55pm

What SSH server are you using? Now, I wouldn't expect that kind of error, but if you using a 32-bit SSH server, it may be accessing 32-bit PowerShell, which can't access the 64-bit Exchange snapin properly. Then again, I could be way off...
Free Windows Admin Tool Kit Click here and download it now
June 18th, 2010 9:09pm

I'm using this guy: http://www.powershellinside.com/powershell/ssh/ Couldn't find out if it supports 64bit Powershell so I wrote a mail to them. EDIT: It's capable of 64bit cmdlets!
June 18th, 2010 9:25pm

I'll install it maybe next week. One pointer would be to find out where the service is pointing to. It should either be C:\Program Files or C:\Program Files(x86).
Free Windows Admin Tool Kit Click here and download it now
June 20th, 2010 4:01am

Hi, Could you import Exchange cmdlets manually after connecting with SSH? Please try and let us know the result. Also run "gcm get-*" and check if "get-mailbox" was listed. Thanks.This posting is provided "AS IS" with no warranties, and confers no rights.
June 21st, 2010 5:38am

Hi, thanks for your support on this. The PowerShell SSH Server supports 64bit cmdlets. When I run gcm get-* I get the exchange cmdlets (the last one that I have listed is Get-X400A...) The ask if I had set the "DomainController" parameter, when I do I get the same error. I don't have to import the exchange cmdlets because I added those in the default $profile. But when I remove it from the profile and add those manually with: add-pssnapin Microsoft.Exchange.Management.PowerShell.E2010 I still can't run them, altough the import works fine...
Free Windows Admin Tool Kit Click here and download it now
June 21st, 2010 8:40pm

Can you create and import a session to the Exchange server? 1) $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://exchangeserverfqdn/PowerShell/ -Authentication Kerberos 2)Import-PSSession $Session Perhaps choose another authentication type? Karlhttp://unlockpowershell.wordpress.com -join("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})
June 22nd, 2010 10:49pm

Hi, Have you tried Karl's suggestions? Any update is welcomed. If there is any problem, please let us know the detailed error message. Thanks.This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
June 24th, 2010 9:00am

Hi, I can open a remote session with: new-pssession -computername myexchangeserver cred mydomain\administrator But that command "$Session = New-PSSession..." doesn't work. I get something like this: While connecting with the Remoteserver the following error occured: A called Loginsession is not available. It may already be closed. Find our more in the help "about_Remoting_Troubleshooting" Screenshot: http://www.imgbox.de/show/img/4UoTXFGNnd.jpg
June 24th, 2010 6:45pm

I'll install it maybe next week. One pointer would be to find out where the service is pointing to. It should either be C:\Program Files or C:\Program Files(x86). Hi Marco, did you get a chance installing / testing it? Thanks!
Free Windows Admin Tool Kit Click here and download it now
June 28th, 2010 10:00pm

Sorry, no. I got into a relatively big project shortly after that message that had me working until midnight almost every night. I won't make any promises at this point...
June 29th, 2010 12:55am

When connecting to the PowerShell SSH Server, by default, the server will use Impersonation. Access can be restricted when impersonation is used, which may be the case in this particular instance. To turn off Impersonation, you can set the NoImpersonation registry key to 1 (On). This key is of DWORD type and is stored along with the other configuration options within the Windows Registry in HKEY_LOCAL_MACHINE\SOFTWARE\PowerShellSSH\Server. Note if the NoImpersonation key does not already exist within the registry, it will need to be created.
Free Windows Admin Tool Kit Click here and download it now
July 12th, 2010 10:07pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics