jump to navigation

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

Posted by keithga in Uncategorized.
trackback

New for MDT 2010

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

http://cid-5407b03614346a99.office.live.com/self.aspx/Blog/MDTApplicationExport.zip

Further

This tool has tremendous potential. Beyond just coping application settings between MDT 2010 Servers.

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.

Keith

Keith Garner is a Deployment Specialist with Xtreme Consulting Group
Advertisements

Comments

1. MDT Driver Exporter – My own GUI creation! » MSitPros Blog | MSitPros Blog - October 25, 2012

[…] I got a little inspiration to do this from Keith Garner after testing his Application Export util (this is a very cool util!): http://deployment.xtremeconsulting.com/2009/11/06/export-share-mdt-applications-new-tool/ […]

2. diagg - September 15, 2010

Hello keith,
the tool is nice, but could be improved :

– would love to see a panel with “target deployment share” so i would not have to edit all scripts (aren’t computers created to make life easier)

– in the same direction : one script for all apps should be enough since we manually select all we want before proceeding…

Hope you are still developing the tool… as you said : the potential is great !

Diag

3. Phil - August 18, 2010

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.

I’m running Windoews Server 2008 SP2 32bit, with MDT 2010 Update1 (32bit) dated 02 July 2010.

Many thanks
Phil

4. CK - May 20, 2010

The hiarchy folder checkboxes are not selectable.
Also errors on execution.

Great idea, but might need some fine tuning

5. Michael - April 23, 2010

If I select a application bundle I get an exeption.

System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at MDTApplicationExport.AppItem.GetShortName(PSObject Application)
at MDTApplicationExport.ExportApplications.ImportLineRecursive(PSObject Application, String RootsName)
at MDTApplicationExport.ExportApplications.ImportLineRecursive(PSObject Application, String RootsName)
at MDTApplicationExport.ExportApplications.ExportSingleApplication(PSObject Application)
at MDTApplicationExport.ExportApplications.ExportAppsRecursive(TreeNodeCollection Nodes)
at MDTApplicationExport.ExportApplications.ExportAppsRecursive(TreeNodeCollection Nodes)
at MDTApplicationExport.ExportApplications.ExportAppsRecursive(TreeNodeCollection Nodes)
at MDTApplicationExport.Form1.tabControl1_SelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.TabControl.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.TabControl.WmSelChange()
at System.Windows.Forms.TabControl.set_SelectedIndex(Int32 value)
at MDTApplicationExport.Form1.NextB_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

6. Rliving - December 3, 2009

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.

Thoughts?

Thanks,
Roy

keithga - December 9, 2009

Thanks!

Exporting apps from SMS/SCCM is a good idea. I’ll add it to my list of requested tools. Keep the ideas comming. :^)


Sorry comments are closed for this entry

%d bloggers like this: