Showing posts with label remoting. Show all posts
Showing posts with label remoting. Show all posts

Wednesday, December 5, 2007

PowerShell remoting on XP and IIS

 

In order to use remoting in PowerShell CTP, all machines should have WinRM (KB936059) and PowerShell CTP installed. After the installation you should run the "Configure-Wsman.ps1" script (resides in the PowerShell home directory). The scripts configures WSMan to enable PowerShell remoting.

 

PS > & $pshome\Configure-Wsman.ps1

 

After the installation, the winrm service is not running (stopped state) so you should start it manually.

 

PS > get-service winrm

Status   Name               DisplayName
------   ----                     -----------
Stopped WinRM             Windows Remote Management (WS-Manag...

 

PS > get-service winrm | start-service

 

To make it load automatically when Windows starts:

PS > Set-Service winrm -StartupType automatic

 

Then I tried to run a command :

PS > Invoke-Expression -ComputerName  computer -Command Get-Process

 

It returned an error

Invoke-Expression : [computer] The WS-Management service does not support the
request.
At line:1 char:18
+ Invoke-Expression <<<< -ComputerName spare -command "get-process"

 

I posted a question in the PowerShell newsgroup and eventually the problem found with help from Marco Shaw.

If you have IIs installed on the machines your installed PowerShell CTP then there is a collision between WinRM port and IIs port.

To solve it temporary, stop the w3svc service and restart winrm service, or try to change the port setings for winrm.

There should be a public KB article from Microsoft on this issue somewhere soon.

Wednesday, September 12, 2007

/n software Bumper Stickers

 
A while ago I wrote on /n software free PowerShell stickers promotion.
 
Given the fact that remoting will be "in the heart" of PowerShell v2 and now that I have the sticker on my car, I wonder If I could start the car remotely from my office ? ;-)
 
 


Thursday, September 6, 2007

.NET Remoting articles


Three articles on remoting published on The Code Project website.
As Jeffrey Snover stated on his last interview with SearchWinIT.com  ('remoting' will be built into the heart of the PowerShell engine).
At the meantime here are some others techniques in .NET.



Just .NET Remoting

A simple .NET Remoting example in three parts: the interface, the server, and the client. The client asks for your name, then sends it to the server. The server returns a personal greeting.




Remote Administration Tool (RAT) in C# - Part 3 (Reverse Connection Shell)
How to access server behind a gateway firewall using reverse connection shell technique



RemoteConsole
Remote console that allows to send commands to remote computer located in the Internet.


All articles includes source file in C#