Export & share MDT Applications (New Tool) November 6, 2009

Presented here is the MDT Application Export Tool (MDTAppExport.exe). This tool will export the settings for a selected Application in MDT 2010 into a Powershell *.ps1 script file. This portable powershell script file can be used to import the Application settings into another instance of MDT 2010.

One of the coolest new features of MDT 2010 is the new Powershell Programming interface. This interface makes it possible for 3rd party programs to Read, Manipulate, and Create settings in your MDT 2010 environment.

Still, Powershell is a relatively new programming language. And many IT Pros may still be unfamiliar with it. Which makes this tool so cool, you can create powershell scripts without knowing powershell.

Advantages

Exporting to Powershell provides a good way to share Application metadata between MDT 2010 Shares:

Upgrade your existing MDT 2008 Deployment Share to MDT 2010, and extract out all of your applications for archival.

Move individual applications between test and production environments without copying other items still in test.

Use Powershell scripts as a way to document/store the settings for each application in your environment.

Share your solutions to difficult/complex application installations to IT Community Forums (please don’t share software files you don’t have the rights to redistribute :^) ).

Notes

While running the Application Script Export Tool Wizard, Simply select one of the Deployment Shares already present in the Microsoft Deployment Toolkit 2010 Workbench. Then Select the Applications you wish to export, and the Target location they should be exported to.

Most applications should export without trouble 97-98% of the time. However it is generally a good idea to review the settings created by the tool to ensure that everything is correct.

This script will create one Powershell *.ps1 script file for each item selected in the wizard. If an Application has dependencies defined in the MDT 2010 Workbench, then the dependencies will also be included in the same *.ps1 file.

All Source Files imported into the Deployment Workbench when the Application was created will be copied to the Target Location.

Limitations

You must have MDT 2010 installed on the same machine this tool is running on.

You must have your Deployment Share visible in the MDT 2010 Deployment workbench.

This tool will create one *.ps1 for each application Selected, and all dependent applications will be imported to the same *.ps1 file.

If you have hidden and or non-enabled applications defined, they will also be Displayed in the Application Script Export Tool Wizard.

This tool will create scripts with the –hidden and –enabled settings as defined in the workbench.

This tool will *not* export the Language Field. Language Field is not used in ZTIApplications.wsf

If you are exporting Sources, the files must be located in the Deployment Share, meaning that you can’t have a %ResourceRoot% at a different location from the %DeployRoot%.

If there were any errors in copying the Sources to the Target, there should be an
“# ERROR – <something>”
line present in the source.

Please ensure that all application items imported into MDT are placed in their own directory. Installing more than one Application Item from the same directory may result in duplicate files in the MDT system.

Links

Further

We are already using this tool here at Xtreme Consulting Services to create “repositories” of applications that can be used to quickly build out MDT 2010 deployments for our customers. A fullly functional MDT 2010 Litetouch Deployment System setup on site in Hours, not Days, or Weeks.

It could also be the start of a public repository of Applications for MDT Administrators. Although I have not yet figured out a great hosting site for this kind of community/forum. Have some ideas, drop me a line.

Update: 11/13/09 – I updated the tool to generate scripts that support Powershell v1.0 better, and to fix a problem with applications with spaces in the shortname.

Hi Keith
Loved the idea of the app… I’m running a prooof on concept and wanted to import apps programatically between servers, rather than type all the details in over again, and found your app!

Sadly, I have an issue running it. I’m getting: Unhandled exception has occurred in your application…. Could not load file or assembly ‘System.Core. Version3.5.0.0 {some more data here} The system cannot find the file specified.

I realise that you’re not providing support, but if you have a pointer as to what I may have missed I’d be very much obliged.

Hi Keith,
Very nice tool! I like the application archive idea. I have a question related to packaged application sharing, but with a slightly different twist.

At my work, we have a requirement to use the same SMS (SMS 2003 SP3) packages to build the Base Reference Images as we use to deploy out to existing clients. With some Program variations on Imager versions, meaning ones where we do not want any of the normal daisy chained reboot or program install notifications to occur during the automated image build.

My question is, do you have a tool that could read the SMS db for a given ProgramID, and pull the install commands and source files (source files from a given SMS DP) for that program and any daisy chained programs. Then place that information into an imported able Applications XML (like what you’ve done here)? This would allow you to take advantage of the all the configuration and packaging effort that’s already done in SMS, within MDT and not have to Manually configure those SMS packaged applications.