Automating Remote Microsoft Management Console (MMC) – It’s Simple!

Max Trottier Tips & Tricks Leave a comment

While running a remote MMC Snap-In is useful, automating it is bliss! Session Macros/Scripts/Tools will do the job, configure once and run the MMC against any of your servers.

Here’s how you do it:

1. Create the session tool via: Edit -> New Entry -> Add Macro/Script/Tool
2. Select: “Command Line”
3. Name: “DHCP”
4. Run: “dhcpmgmt.msc /ComputerName $HOST$” (see notes below)
  • Note: if you only put “dhcpmgmt.msc” in the run textbox and hit “Assign file icon to session,” the dhcpmgmt.msc icon will be assigned
  • Note: Passing the host name can be tricky, as some Snap-Ins require different parameter formatting. For example: /Computer=$HOST$ or /ComputerName $HOST$
5. Select: “Run as Administrator”
6. Select: “Open embedded/tabbed” (see note below)
Note: Embedding the console works with most Snap-Ins
Next, double-check your sessions. They must be configured to feed the proper credentials to the session tool. On the Tools tab of each session, make sure you’ve selected the proper credentials to be supplied:

  • Use default credentials = send nothing and let Windows figure things out
  • User session credentials = use the same credentials as the session
  • Use custom credentials = use specific credentials
  • Use credential repository = specify a set of credentials from the repository
To run the Snap-In, select your session and locate the tool in the dashboard.  If everything is configured properly, a simple click is all you need!
We hope this gives you a helpful new way to manage your day-to-day workload, and make your life simpler and more efficient. If you have other great tips on using session macros/scripts/tools that we can share with the community, please let us know! 
About the Author

Max Trottier


Maxime has extensive experience in product management, communication and advertising, and has spent the last several years helping renowned organizations bring their high-end solutions to customers worldwide. As Director of Marketing, Maxime leads Devolutions’ international market research and development efforts, along with customer relations and overall business development. He’s driven to bring innovative and cutting-edge solutions to Devolutions’ customers around the globe. Maxime earned his Bachelor degree in Business Administration from the University of Québec at Trois-Rivières, and regularly attends sales and marketing workshops to increase his knowledge and expertise.

Max TrottierAutomating Remote Microsoft Management Console (MMC) – It’s Simple!
  • Anonymous

    I tried to launch remote MMC snap-in this way, but it launches the local snap-ins rather than the remote? I have double checked the credentials and tried using different settings. Any ideas? Thanks.

    • http://www.blogger.com/profile/08607370033925509660 Maxime Trottier

      Not all snap-ins support remote management. Please contact us at support@devolutions.net

    • http://www.blogger.com/profile/16406675852990286716 Shavelieva

      This comment has been removed by the author.

    • http://www.blogger.com/profile/16406675852990286716 Shavelieva

      runas /netonly /user:contosoFirst.Last “mmc dhcpmgmt.msc”
      This works for prompting user credentials and opening the snap in. btw, most snapin’s require calling ‘mmc’ first then passing the msc.
      What I can not figure out is cli switches for dhcpmgmt.msc to ‘add server’ rather than using authored msc previously created. Ideas?

    • http://www.blogger.com/profile/08607370033925509660 Maxime Trottier

      The clarifications are on the technet site : http://social.technet.microsoft.com/Forums/windowsserver/en-US/8feb2232-3a21-4b56-88b6-04036b984864/dhcpmgmtmsc-parameters?forum=winserverNIS

      You must either configure your snap-in and save the console, or use the command line to perform the task you wanted to run in the console.

  • Pingback: 2013 Year in Review: Part 1 | Devolutions Blog