Posted by Mikael Nystrom on March 26, 2015
After deploying a OS in MDT there are some “leftovers”, this script will remove those settings which is very convenient when creating a ref image that uses another WSUS server and you would like to minimize issues. Just download it, unzip it, import as an application, like this.
Then add it as an application in the MDT Task Sequence, something like this.
Download : http://1drv.ms/1bwlwXm
Posted in MDT | Tagged: MDT;OSD | 4 Comments »
Posted by Mikael Nystrom on September 3, 2014
Often I need to import applications into the Deployment workbench and that is fine. The process is easy and fast, but it is boring and if you have more then 5 apps it is really boring. Based on the fact that almost all my apps in MDT is deployed using VB or PowerShell wrappers its is just one file in a folder and then there is a subfolder with the content. You don’t need to be a genius to figure out that 90% of all the apps pretty much have the same folder and file structure in the root of the application folder, so why don’t we use PowerShell to import all the apps based on some guessing?
This parts can be modified, edit, or you can add your own. Basically it reads the from the folder structure you specify and the script will then scan the folder structure for folders, assuming that every folder is an application. If it finds .msi, .msu, exe, .bat, .wsf, or .ps1 files it will then import them as applications. The important thing is that it will import the first “hit”. That means that you should store the real setup files in a subfolder, I usually use .\Source as the source folder. Here you can see the .WSF part logic
Part of the script.
The command line:
This is the tricky part, since there is no way to know that it will be a guessing game and the command line might need to be modified after import, but I rather modify 2-3 applications instead of importing all of them manually.
The default cmdline for all imported apps will be:
||"msiexec.exe /i $Install /qn"
||"wusa.exe $Install /Quiet /NoRestart"
||"PowerShell.exe -ExecutionPolicy ByPass -File $Install"
The script is rather easy, it takes 2 parameters. The folder from where to import and the deployment share. You need to have MDT installed since it is using PowerShell cmdlets from MDT. The syntax for the script looks like this:
.\Import-MDTApps.ps1 -ImportFolder C:\Script\AppFolder -MDTFolder C:\MDTBuildLab
you could also add –Verbose if you like lots of text on the screen.
Output when using –Verbose during import.
You can download the script here: http://1drv.ms/1pGTvkA
Posted in Deployment, MDT | Tagged: MDT;OSD | 4 Comments »