How to Use PowerShell to Run Exchange2010 Commands Remotely from Windows 7 Client
Hi IT World,
My Task : i want to run the cmdlets in exchange server 2010 from my windows 7 laptop using Power Shell 2.0
I Tried : In my windows 7, opened power shell and run below cmds using Exchange Server administrator Account
1)
$user = Get-Credential
2)
New-PSSession -ConfigurationName Microsoft.Exchange ConnectionUri
http://servername/powershell -Credential
$user
Error Received : the winrm client cannot process the request because the server name cannot be resolved.
categoryinfo : open error: system
fully qualified error id : PS seesion open failed
Plz check the image and plz do needful any one..............
April 24th, 2012 8:45am
Hi
>>the winrm client cannot process the request because the server name cannot be resolved.
Can you ping the value that you have for servername? This error appears to indicate a DNS lookup failure.
Cheers, Steve
Free Windows Admin Tool Kit Click here and download it now
April 24th, 2012 9:12am
on exchange server did you run:
Enable-PSRemoting
and did you configure WinRM ?
if you use external domain and internal you should write internal domain.
April 24th, 2012 9:14am
Dear Remi, thanks a lot for responding me
How can i verify if remoting is enabled or not?........i tried
Enter-PSSession
-ComputerName localhost ( http://www.ravichaganti.com/blog/?p=1060 )
and how to configure WinRM
Free Windows Admin Tool Kit Click here and download it now
April 25th, 2012 1:17am
Dear Steve , thanks a lot for responding me
Yes i am able to ping...........
April 25th, 2012 1:18am
How can i verify if remoting is enabled or not?
Hi,
Please run the cmdlet Get-User youraccount | fl RemotePowerShellEnabled on Exchange 2010 EMS.
Enable Remote Exchange Management Shell for a User
http://technet.microsoft.com/en-us/library/dd298084.aspx
If the remote powershell is enabled, please run the following cmdlet and try it again:
netsh winhttp reset proxy
If it still doesn't work, please check the settings as following Technet document lists:
Connect Remote Exchange Management Shell to an Exchange Server
http://technet.microsoft.com/en-us/library/bb232090.aspx
By the way, I would suggest you install the Exchange 2010 Management Tools on your Windows 7 client directly:
Install the Exchange 2010 Management Tools
http://technet.microsoft.com/en-us/library/bb232090.aspxFrank Wang
TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
April 25th, 2012 4:19am
Buddy..... here i am using direct with administrator account not as a member account, hope it is enabled for administrator default
April 25th, 2012 4:52am
on exchange server, run powershell console as administrator, type winrm qc and enter.
Select Y few times.
check in services.msc WinRM service - should be startup auto-start
check winrm connection from some client to exchange server:
winrs -r:remoteservername dir
I'm using something like this:
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://exchangeserver.domainname.local/PowerShell/ -Credential $UserCredential
Import-PSSession $Session
Free Windows Admin Tool Kit Click here and download it now
April 25th, 2012 6:00am
How can i verify if remoting is enabled or not?
Hi,
Please run the cmdlet Get-User youraccount | fl RemotePowerShellEnabled on Exchange 2010 EMS.
Enable Remote Exchange Management Shell for a User
http://technet.microsoft.com/en-us/library/dd298084.aspx
If the remote powershell is enabled, please run the following cmdlet and try it again:
netsh winhttp reset proxy
If it still doesn't work, please check the settings as following Technet document lists:
Connect Remote Exchange Management Shell to an Exchange Server
http://technet.microsoft.com/en-us/library/bb232090.aspx
By the way, I would suggest you install the Exchange 2010 Management Tools on your Windows 7 client directly:
Install the Exchange 2010 Management Tools
http://technet.microsoft.com/en-us/library/bb232090.aspxFrank Wang
TechNet Community Support
April 25th, 2012 11:10am
Hi,
Any updates?Frank Wang
TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
April 26th, 2012 10:04pm