February 08, 2008, 12:31 PM — In several of these newsletters recently, I've shared some tips on using Windows
Management Instrumentation Command-line (WMIC) for administering various aspects
of Windows systems. And some of these tips have come from helpful readers - keep
them coming! In the meantime, here's another tip that was passed on to me and
which may be of use to you.
Have you ever been in a situation where you need to use Remote Desktop Connection
to connect to a remote machine but unfortunately the Remote Desktop feature
hasn't been enabled on the remote machine? Well, you can enable Remote Desktop
remotely using-you guessed it-WMIC. Here's how:
wmic /node:"computername" /user: "domainname\username" /password:"password"
rdtoggle where servername="computername" call SetAllowTSConnections
1
Doing this requires that the Remote Registry service be running on the remote
machine, which it is by default for Windows XP and Windows Server 2003. If you've
disabled this service for security reasons however, then you're out of luck.
By the way, if you haven't read Gathering WMI Data without Writing a Single Line of Code by John Kelbley then take a look, it's a great way to start becoming familiar with the power of WMIC.














