?
Solved

How to open "Computer Management" panel to a remote system from command line?

Posted on 2004-11-16
4
Medium Priority
?
44,961 Views
Last Modified: 2013-12-03
I'm looking for a solution to open the "Computer Management" MMC panel (compmgmt.msc) directly to a remote system from the command line... that is, without having to open the panel then choose the menu "Action"|"Connect to another computer..."

You can do what I want easily with other related parts like "eventvwr.exe \\<remotepcname>", but not "mmc compmgmt.msc \\<remotepcname>".

Perhaps a short VBScript would be needed to call the COM object for the snap-in???

TIA-- ~ewall
0
Comment
Question by:ewall
4 Comments
 
LVL 7

Accepted Solution

by:
tymes earned 1000 total points
ID: 12599577
Quickly just off the top of my head, I might just run compmgmt.msc in Author mode...

compmgmt.msc /a

Manually connection to machine2
save as... computermanage-machine2.msc
repeat, manually connecting to server2
save as... computermanage-server2.mcs
etc..

then from the command prompt just run the appropriate computermanage-%computername%.msc you wanted.  The drawback is that you have to pre-create all the MSCs you will need.

I might also just author one MSC that has all the computers already connected, add a new computer managment plugins for each computer then you only need to open one MSC and have all the computers there.  You can also add other mmc items too, not just computer mangement.

When you do add a new Computer Management plug in, there is an option "Allow selected computer to be changed when launching from the command line.  This only applies if you save the console." but I don't know how you take advantage of that.  It implies you just save one authored console with this option enalbed and there is some way to change which computer it connects to.


Signed.

0
 
LVL 4

Expert Comment

by:jonnyz0109
ID: 12599789
What does the /a flag do, tymes?
0
 
LVL 3

Author Comment

by:ewall
ID: 12604735
Tymes, you got me in the right direction... The "Allow selected computer to be changed when launching from the command line..." option was right.

I first started by making my own with that option, then couldn't figure out what command to use to switch to that computer. A little Googling revealed the command "<consolename>.msc /computer=\\<computername>"

As it turns out, this syntax is already enabled on Computer Management by default! So, all I have to do is "compmgmt.msc /computer=\\<computername>" and I can quickly get to any of the 4500 PCs we manage here (and I can put this into the scripts I'm writing).

Thank you!      ~ewall
1
 
LVL 12

Expert Comment

by:benhanson
ID: 22136266
And for quick launching of this, create a batch file in your home directory called cm.bat, with the command compmgmt.msc /computer=\\%1 and from there on out you can get to computer management on machines by doing start:run:cm servername
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

cPanel is a Unix based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site. cPanel utilizes a 3 tier structure that provides functionality for administrators, rese…
Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question