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

Posted on 2004-11-16
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
Question by:ewall
    LVL 7

    Accepted Solution

    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

    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.


    LVL 4

    Expert Comment

    What does the /a flag do, tymes?
    LVL 3

    Author Comment

    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
    LVL 12

    Expert Comment

    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Can you find a fax from a vendor you saved a decade ago in seconds? Have you ever cursed your PC under your breath during an audit because you couldn’t find the requested statement or driver history?  If you answered no to the first question or yes …
    Sometimes people don't understand why download speed shows differently for Windows than Linux.Specially, this article covers and shows the solution for throughput difference for Windows than a Linux machine. For this, I arranged a test scenario.I…
    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…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    761 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

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now