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

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
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
What does the /a flag do, tymes?
ewallAuthor Commented:
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
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Fonts Typography

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.