Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

October 03, 2007 12:00 AM

How can I remotely run commands on a Windows Vista or Windows Server 2008 box?

Windows IT Pro
InstantDoc ID #97237
Rating: (3)

A. Vista and Server 2008 support the WS-Management and Windows Remote Shell. To enable connectivity to a machine, run the Winrm Quickconfig command. For example,

C:\>winrm quickconfig
WinRM is not set up to allow remote access to this machine for management.
The following changes must be made:

Create a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this machine.
Enable the WinRM firewall exception.

Make these changes [y/n]?

When you choose “y,” the following will occur:

WinRM has been updated for remote management.

Created a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this machine.
WinRM firewall exception enabled.

On the client, use the Winrs command with the -r switch to identify the remote system, then the remote command you want to run. For example,

winrs -r:savdaldc01 hostname 
savdaldc01

hostname
savdalwks10

Notice that my local hostname is savdalwk10, but when I run the same command to the remote savdaldc01, the hostname response is the correct remote name.

Related Content:

ARTICLE TOOLS

Comments
  • perezjonestsisah@yahoo.com
    5 years ago
    Oct 18, 2007

    That is a cool tool that microsoft has added to its suite of IT systems management software.

  • ollieitpto
    5 years ago
    Oct 10, 2007

    do both client and server machines have to be running vista / server2008?

    It would be nice if the remote machine had to be server2008, but the local machine could be XP.

    Otherwise this it isn't possible to roll out applications which use this feature for many years to come.

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.