header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

Access Remote Machine
Last Post 10 Oct 2008 02:43 PM by marco.shaw. 7 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
kartik_maguwalaUser is Offline
New Member
New Member
Posts:2
Avatar

--
03 Jul 2008 04:45 PM  

Hello,
When I try to execute
$r = New-Runspace internalComputername -cred domain\user
in Powershell gives me error
The WinRM client sent a request to an HTTP server and got a response saying the requested HTTP URL was not available. This is usually returned by a HTTP server that does not support the WS-Management protocol.

I want to know what it means and how to solve?

I have also installed powershell 2.0 and WinRM to client machine to which i am trying to connect.

- Kartik

 

halr9000User is Offline
PowerShell MVP, Site Admin
Basic Member
Basic Member
Posts:335
Avatar

--
03 Jul 2008 04:54 PM  
If you have powershell V2 CTP 2, then the requirements are Vista or 2008 + WinRM 2.0 on both sides. This is steeper than what the first CTP had, so make sure you are meeting that.

I would start doing tests using winrm & winrs executables to see if you can find config issues. did you run "winrm quickconfig" on the server?

Note that the params to winRM clash horribly with powershell token parsing which I just can't stand...it's easier to run them from cmd.exe unfortunately. Or you can escape the dashes, I think that fixes it.
Community Director, PowerShellCommunity.org
Co-host, PowerScripting Podcast
Author, TechProsaic
kartik_maguwalaUser is Offline
New Member
New Member
Posts:2
Avatar

--
04 Jul 2008 07:42 AM  
I am running script from MS 2003 64 bit and try to connect Win XP 32 bit machine.
Is it work?

I have installed Powershell 2.0 CTP on both machine.

Please reply..

- Kartik
halr9000User is Offline
PowerShell MVP, Site Admin
Basic Member
Basic Member
Posts:335
Avatar

--
04 Jul 2008 03:07 PM  
The processor platform is irrelevant to WinRM.
Community Director, PowerShellCommunity.org
Co-host, PowerScripting Podcast
Author, TechProsaic
marco.shawUser is Offline
Co-Community Director
Basic Member
Basic Member
Posts:195
Avatar

--
08 Jul 2008 02:49 AM  
Posted By kartik_maguwala on 07/03/2008 11:42 PM
I am running script from MS 2003 64 bit and try to connect Win XP 32 bit machine.
Is it work?

I have installed Powershell 2.0 CTP on both machine.

Please reply..

- Kartik


Very important to note here whether you have CTP1 (November 2007) or CTP2 (April 2008).  CTP1 depends on WinRM 1.1, and CTP2 depends on WinRM 2.0 CTP1 or CTP2.

CTP1 with WinRM 1.1 work on XP, but you have to connect to another system with CTP1 and WinRM 1.1 installed.  You can't mix and match CTP versions and WinRM versions.

Now, you mention XP...  Do you have IIS running?  WinRM 1.1 and IIS on XP can't run on the same port.  If you have IIS, shut it down, retry remote commands to see if that fixes you up.

Marco

*Microsoft MVP - Windows PowerShell: http://www.microsoft.com/mvp
*PowerGadgets MVP: http://www.powergadgets.com/mvp
*Blog: http://marcoshaw.blogspot.com
karuvUser is Offline
New Member
New Member
Posts:1
Avatar

--
10 Oct 2008 07:17 AM  

any budy help me

1. How can i stop or start a remote system services through powr shell?

kilaruv

india ,pune.

marco.shawUser is Offline
Co-Community Director
Basic Member
Basic Member
Posts:195
Avatar

--
10 Oct 2008 02:43 PM  
There are various ways to accomplish this.

Using WMI:
(gwmi win32_service -filter "Name='w32time'").stopservice()
(gwmi win32_service -filter "Name='w32time'").startservice()

Do something like this for a remote machine:
(gwmi win32_service -filter "Name='w32time'" -computername "some_computer").stopservice()
(gwmi win32_service -filter "Name='w32time'" -computername "some_computer").startservice()
Marco

*Microsoft MVP - Windows PowerShell: http://www.microsoft.com/mvp
*PowerGadgets MVP: http://www.powergadgets.com/mvp
*Blog: http://marcoshaw.blogspot.com
marco.shawUser is Offline
Co-Community Director
Basic Member
Basic Member
Posts:195
Avatar

--
10 Oct 2008 02:43 PM  
Oh, this is in a v2 forum... Are you using v1 or v2? There's some other methods in v2 that are more "built-in".
Marco

*Microsoft MVP - Windows PowerShell: http://www.microsoft.com/mvp
*PowerGadgets MVP: http://www.powergadgets.com/mvp
*Blog: http://marcoshaw.blogspot.com
You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer