Automatically configuring the ConfigMgr console for MDT 2012


As part of the MDT installation process, you need to run the “Configure ConfgMgr Integration” wizard to add the MDT components into the ConfigMgr console and database.  But what if you want to automate that process?  Fortunately, that’s pretty easy to do using PowerShell, as the integration process really just copies some files around.

See below for the attached PowerShell script, which performs the following tasks:

  • Locates the MDT installation directory.
  • Attempts to find the ConfigMgr 2007 console’s installation directory.  If found, copy files and folders from the MDT installation directory to that location.
  • Attempts to find the ConfigMgr 2012 console’s installation directory.  If found, copy files and folders from the MDT installation directory to that location.

So there’s not much to it.  Note that the wizard does a couple of additional tasks that aren’t covered by this script:

  • Add the MDT task sequence actions into the ConfigMgr database.  This is done by editing a MOF file to specify the site server name and site code, and then compiling that MOF.  This process just needs to be done once, generally at the top-level site only.  It’s easy enough to do this one-time operation manually (using an account that has full permissions to the site server), so no real need to automate it.
  • Remove the MDT extensions from an existing ConfigMgr console.  This is left as an exercise for the reader:  Instead of copying the files to the ConfigMgr console directory, you just need to remove them.

Make sure you run this script from an elevated PowerShell session, and also make sure that PowerShell scripting has been enabled using something like “set-executionpolicy bypass”.

ConfigureConfigMgrIntegration.ps1

Comments (8)
  1. Hi Michael, thank you for a nice script, the ConfigMgr console configuration works fine. I use this to be able to import a MDT Task Sequence automatically after installation of SCCM without any user interaction. To be able to make the import I update the
    first line in …Microsoft Configuration ManagerAdminConsolebinMicrosoft.BDD.CM12Actions.mof. by adding server and site information.

    While import a MDT task sequence I get the error: “Failed to load class properties and qualifiers for class BDD_UsePackage in task sequence”.

    I hope you or somebody have knowledge about this issue.

  2. LarsErikP says:

    I have the solution for the issue ThomasGUD and BvZanten descripes. It’s just a minor detail 😉
    Change this line:

    Copy-Item -Path "$mdtPathTemplatesCM12Extensions" -Destination "$cm12PathXmlStorageExtensions" -Force -Recurse

    To this:
    Copy-Item -Path "$mdtPathTemplatesCM12Extensions*" -Destination "$cm12PathXmlStorageExtensions" -Force -Recurse

    Yeah, just add "*". Or else the paths wil be wrong in the SCCM directory 🙂

  3. Thomas Bigred says:

    Nice script. As BvZanten comments, the are some issues with the missing "Create MDT task sequence".
    Any chance you’ll post a version of the script for MDT 2013 and ConfigMgr 2012 R2. Thanks!

  4. Ed (DareDevil57) says:

    thanks

  5. This is what I've got to do for some easier applications right now.

  6. BvZanten says:

    Thanks Michael, I was looking for this. I’d found out the copy myself using compare, but still I think something is missing, maybe a dll registration or else.. The point is: I am missing toolbar icons, and probably more… When I open the SCCM console
    and goto Software Library – Operating Systems – Task sequences I don’t see ‘create MDT Task sequence’ using the above powershell method. If I use the wizard to add integration the toolbar IS changed !

  7. Some more investigation and I just had to compile the MOF file by using MOFCOMP to have a fully automated MDT integration.
    Thanks again for sharing the Script 

  8. B says:

    Just installed and configured MDT on my SCCM 2012 R2 CU3 server. When viewing Task Sequences in the console on the server I can see MDT options. However, I CANNOT see MDT options when viewing Task Sequences on the console on my workstation. Anybody else experience this?

Comments are closed.

Skip to main content