MDT PowerShell: New Module in MDT 2012

MDT-PowerShell-2012

Microsoft Deployment Toolkit 2012 now comes with a PowerShell module in addition to the PSSnapIn used in previous versions. In earlier versions of PowerShell in order to start using the PowerShell cmdlets for MDT you would have to add the snap-in by running this command:

Add-PSSnapIn Microsoft.BDD.PSSnapIn

Your scripts will still work with this method and it hasn’t been removed. But now the scripts are called by using a Module with this command:

Import-Module “C:\Program Files\Microsoft Deployment Toolkit\Bin\MicrosoftDeploymentToolkit.psd1”

Using Get-Command –Module you can see that there are cmdlets for the new monitoring service.

image

I’m not sure that this module adds any value as the module would have worked better if deployed to the usual location of  C:\Windows\System32\WindowsPowerShell\v1.0\Modules so you wouldn’t need to type the entire path when calling it. You would also be able to discover it like in this example.

image

I guess I should have spoke up more during the beta testing but I was busy with my new baby. Sorry.

About these ads

About Andrew Barnes

A Scipting and Deployment Specialist.
This entry was posted in MDT 2012, PowerShell, Scripting and tagged , , . Bookmark the permalink.

One Response to MDT PowerShell: New Module in MDT 2012

  1. Gyz says:

    Thanks for the info. When I copy the MDT module and all Microsoft.BDD.PSSnapIn.* files to the PS module folder once, there available with a normal Import-Module MicrosoftDeploymentKit.. Much better than always specifying the path ;-)

    Like this

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s