Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


August 2008

Server Core from Afar

Use WinRP and Winrs to set up remote Server Core administration
RSS
Subscribe to Windows IT Pro | See More Utilities Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Executive Summary:

In our ongoing effort to configure Windows Server 2008's GUI-less incarnation, Server Core, we've named the server, given it a DNS suffix, assigned static IP values, enabled Automatic Updates, and worked a bit with Ocsetup and Oclist. Now, it’s time to set up remote Server Core administration by taking the nifty new remote-access tool Winrs for a spin.

Web Elements? N/A

In this column’s continuing effort to configure Windows Server 2008’s GUI-less incarnation, Server Core, we’ve named the server, given it a DNS suffix, assigned static IP values, enabled Automatic Updates, and worked with Ocsetup and Oclist— tools that let you add or remove server modules such as DNS and DHCP. Now, let’s set up remote Server Core administration by taking the nifty, new remote-access tool Winrs for a spin.

A Better Alternative
When I set up Server Core systems for clients, they always want to know how to enable Remote Desktop. My answer is always, “Wait! There’s a better alternative!” Server Core can’t run 95 percent of GUI-based applications, so there’s no need to enable Remote Desktop, particularly when Server 2008 and Windows Vista share a new secure remote command shell—that is, the Winrs command.

I like Winrs because although it’s a remote-control tool, it doesn’t require that you open any of the Five Ports of Peril—TCP 135, 139, and 445 and UDP 137 and 138. Winrs runs atop TCP port 80; it essentially runs on HTTP or, more exactly, HTTPS traffic. To do so, Winrs takes advantage of the relatively new Windows Remote Management (WinRM) protocol that’s built into Server 2008 and Vista. You enable WinRM by typing (from an elevated command prompt)

 winrm quickconfig -quiet

Run that command on both the host and client machines—you need only do it once.

WinRM won’t let Winrs communicate with any hosts except the ones it trusts. WinRM trusts all fellow members of an Active Directory (AD) forest, but a WinRM client won’t talk to another system in a workgroup unless you give the client the OK by issuing the command

 winrm set winrm/config/client @{TrustedHosts=”<list>”}

where list is either a comma-delimited list of DNS names or IP addresses of trusted systems, or an asterisk to denote “trust every host.” For example, to trust the system at 192.168.1.7 and the system named ace.bigfirm.com, you’d type

 winrm set winrm/config/client @
  {TrustedHosts=”192.168.1.7,ace.bigfirm.com”}

You must type the TrustedHosts command on the client, not the server. Thus, if I wanted to use Winrs to control a Server Core system from a Vista system, all I’d have to do is enable WinRM on both systems, then execute a TrustedHosts command on the Vista machine, and I wouldn’t have to execute one on the Server Core system. That seems a bit backward to me! In fact, given that Winrs requires NTLM, Kerberos, or certificate-based logons by default, it already boasts plenty of security, and you’re probably safe by simply typing the following command at the client:

 winrm set winrm/config/client @{TrustedHosts=”*”}

Putting It to Work
To find out your system’s current list of trusted hosts, you’d type

 winrm get winrm/config/client

Assuming that your client system trusts the remote Server Core system and that both systems have run winrm quickconfig (or the Group Policy equivalent), you’d then type

 winrs -r:<remotesystemnameoraddress> [-u:<username>] <command>

If you’re remotely controlling a system in the same forest and need to use a different account than the one you’re logged in as, or if you’re remotely controlling another system in a workgroup, you’d use that -u parameter. For example, to tell a system named sc1 .bigfirm.com to run an IPconfig command where sc1.bigfirm.com has an administrative account named administrator, you’d type

 winrs -r:sc1.bigfirm.com -u:administrator ipconfig

Winrs would then prompt you for the password for the administrator account, and you’d get the output of an IPconfig command run on sc1.bigfirm.com. If you need to run several commands instead of just one—a likely scenario on Server Core—you’d be better off typing

 winrs -r:sc1.bigfirm.com -u:administrator cmd

On my Vista desktop, Winrs is useful as a command prompt that I can open at any time and type an administrative command to the Server Core system. I think WinRM and Winrs add up to a far superior remote-command solution for Server Core than Remote Desktop (unless you’re attempting remote control from Windows XP, which doesn’t offer Winrs). Give it a try!

End of Article



Reader Comments
Is there a way to get command line completion once I do
winrs -r:sc1.bigfirm.com -u:administrator cmd

8100dshot October 04, 2008 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Friday at PASS Europe 2006

Kevin talks about the closing day of the event and shares a funny Microsoft film. ...

More fun TechEd 2005 Resources

Kevin points out some more TechEd resources ...

What service packs and fixes are available?

...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Are You Satisfied?

A Preliminary Look at Deployment Plans for Microsoft Windows Vista

Related Events Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.

Job Openings in IT


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

Microsoft Exchange & Windows Connections event returns to Las Vegas Nov 10 - 13
Connections returns to Las Vegas for this exciting event where each attendee will receive SQL Server 2008 standard with 1 CAL. Co-located with Microsoft ASP.NET, SQL Server, and SharePoint Connections with over 250 in-depth sessions.

Free Online Event! Virtualization:Get the Facts!
Register now and attend this free, live in-depth online conference on November 13 and 20, 2008, produced by Windows IT Pro. All registrants are eligible to receive a complimentary one-year digital subscription to Windows IT Pro (a $49.95 value)!

Check Out Hyper-V Video on ITTV
Watch Karen Forster's interview on Hyper-V's performance on ITTV.net.

Ease Your Scripting Pains with the Flexibility of PowerShell!
Join MVP Paul Robichaux on December 11, 2008 at 11:00 AM EDT as he equips you with PowerShell basics in 3 introductory lessons, each followed by a live Q&A session—all on your own computer!

PASS Community Summit 2008 in Seattle on Nov 18-21
The don’t-miss event for Microsoft SQL Server Professionals. Register now and you’ll enjoy top-notch Microsoft and Community speakers and more.



Solving PST Management Problems
In this white paper, read about the top PST issues and how to administer local/network PST Files.

Get Protected -- Data Protection Manager 2007
Protect your virtualized environment with Data Protection Manager

Order Your SQL Fundamentals CD Today!
Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD.

Maximize Your SharePoint Investment: Get Your Data Moving
Watch this web seminar now to learn how to maximize your SharePoint investment! Join us as we take a look at the complex business of securing, accessing and managing vast amounts of information in a global network and various ways to get your data moving.
Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing