The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…

  • Archives

  • Meta

Archive for the ‘MDT’ Category

Nice to have–VB Script Wrapper for all VC++ installers to be used in MDT

Posted by Mikael Nystrom on September 25, 2014

During todays session at The Ultimate Event I did a demo of a VBscript Wrapper that install all VC++ runtimes. Mr “Someone” asked if it was published and I said yes, I was wrong so here it is.

The Script

The script will install all versions of VC++ on 32 and 64 bit machines as an application in a task sequence, that way you don’t need to have one application for each VC++ application.

Download the script from here http://1drv.ms/1wLOJ5E

The Task Sequence

After you have added the application in the MDT workbench, add the application to the Workbench like this:

image

The Application

When importing the application it should look like this:

image

The folder

The folder needs to have all the VC++ files organized in a folder structure that looks like this:

image

You can use the script in the following folder to download all files in the correct folder structure. Check this blog post:http://deploymentbunny.com/2014/08/05/powershell-is-king-download-all-vc-runtimes-using-a-script/

/mike

Posted in MDT | Tagged: | 4 Comments »

PowerShell is King – Bulk import applications I MDT

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?

The Logic:

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

image
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:

.EXE "$Install /q"
.MSI "msiexec.exe /i $Install /qn"
.MSU "wusa.exe $Install /Quiet /NoRestart"
.PS1 "PowerShell.exe -ExecutionPolicy ByPass -File $Install"
.WSF "cscript.exe $Install"

The Script:

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.

image
Output when using –Verbose during import.

You can download the script here: http://1drv.ms/1pGTvkA

/mike

Posted in Deployment, MDT | Tagged: | 1 Comment »

My sessions at TechEd Europe 2014

Posted by Mikael Nystrom on August 27, 2014

image

TechEd Europa 2014

TechEd Europe is Microsoft’s premier technology conference for IT Professionals and Enterprise Developers, providing the technical education, product evaluation, and community resources to plan, architect, deploy, manage and secure a connected enterprise. TechEd Europe will be held October 28-31 at Fira Barcelona in Barcelona, Spain. For more information: http://europe.msteched.com

PRC05: Deploying and Managing Windows in the Real World

What does it take for organizations to deploy and manage Windows 8.1 and Windows Phone? During this all-day seminar, examine the requirements needed to execute the entire process. We ensure that you understand what has changed in Windows 8.1, how you prepare for a Windows 8.1 migration, how to create your Windows 8.1 image, how to deploy Windows 8.1, and how to deploy Windows Store apps to the already-deployed computers using an enterprise app store. Regardless of whether you are new to Windows deployment and management, new to Windows 8.1, or an existing Windows 7 or Windows XP expert, there will be benefits for all attendees, from “how-to’s” to best practices, to tips and tricks

WIN-B314: Deploying Windows 8.1 Using Microsoft Deployment Toolkit (MDT)

If your job contains the duty of deploying Windows 8/8.1 and you would like to do this using the free tools provided by Microsoft, this session is for you. During the session we cover the basic steps to install the solution and the configure it. We explain things like reference images, Windows Deployment Services, Microsoft Deployment Toolkit, Lite Touch, new computer scenario, refresh old computers and how to replace old computers while keeping the user data and re-installing applications.

A message from Mike:

You are invited and very much welcome to my sessions. If you do have the time to join the sessions, please don’t hesitate to swing by the podium before or after sessions, it’s ok to just say hi. I hope to see U.
/mike

Posted in Deployment, MDT, TechEd | Tagged: , | Leave a Comment »

Nice to Know–Presenting applications in the MDT Wizard based on location

Posted by Mikael Nystrom on July 8, 2014

A friend (You know how you are…) asked me today “I need to have different application bundles in the MDT Wizard based on location, any ideas?” and since I cant refuse to help a friend, here is a solution.

Use WizardSelectionProfile, Selection Profile and Default Gateway

So here is a step by step, kind of.

Configure CustomSettings.ini

You need to add DefaultGateway to the customsettings.ini to match your environment. So it should look something like this:

[Settings]
Priority=DefaultGateway

[DefaultGateway]
192.168.1.1=NewYork
192.168.2.1=Stockholm

[NewYork]
WizardSelectionProfile=Wizard – HQ

[Stockholm]
WizardSelectionProfile=Wizard – BO

Create the Application folder

In the Deployment Workbench, create a Application folder, where you can store the applications that should be available at the BO site, something like this.

image

Create your WizardSelectionProfile’s

In the Deployment Workbench, Advanced Settings, Selection Profiles – Create a Selection Profile called “Wizard – HQ”. It should contain everything that should be selectable at the HQ site. In this case the folder is not available at HQ.

image

In the Deployment Workbench, Advanced Settings, Selection Profiles – Create a Selection Profile called “Wizard – BO”. It should contain everything that should be selectable at the BO site. In this case all folders are available.

image

Test and verify.

That should be it, so the net result would be something like this:

Running the Wizard at the BO

Apps at the BO

and running at HQ will give you this.

Apps at the HQ

/Mike

Posted in Lite Touch, MDT | Tagged: , | 2 Comments »

PowerShell is King–Convert Windows Server Editions during OS Deployment (MDT/LiteTouch)

Posted by Mikael Nystrom on July 2, 2014

Yesterday I posted a simple UI based PowerShell script that allows the local administrator of the server to change the Windows Edition. That is is a nice to have function, but what if you would like to do that during the deployment of the server instead of after. This way you can have two task sequences, one for Standard and one for datacenter but just have one WIM file (also means one reference image). For the same reasons I mentioned in the previous post,  I have created some scripts for this.

You can read the previous post on the UI method here http://deploymentbunny.com/2014/07/01/powershell-is-kingconvert-windows-server-editions-using-a-ui-based-powershell-script/

All three options here are using the same base logic with the same kind of option. Instead of defining every different “upgrade” , I decided to have just 2, NEXT and TOP. When TOP is selected as an option it will upgrade to the TOP Edition, in other words Datacenter. When NEXT is selected, it will do the NEXT level. That means that a standard will be datacenter, unless it is a 2008 r2, then a standard will be enterprise. Evaluations will be the “same, so a standard evaluation, will be a standard . In a bit more detail, this is what the scripts actually do…

What kind of conversion can the scripts perform?

Source OS   UpgradeLevel Destination OS
Windows Server 2008 R2 Standard to NEXT Windows Server 2008 R2 Enterprise
Windows Server 2008 R2 Standard   TOP Windows Server 2008 R2 Datacenter
Windows Server 2008 R2 Enterprise   NEXT/TOP Windows Server 2008 R2 Datacenter
Windows Server 2012 Standard Evaluation   NEXT Windows Server 2012 Standard
Windows Server 2012 Standard Evaluation   TOP Windows Server 2012 Datacenter
Windows Server 2012 Standard   NEXT/TOP Windows Server 2012 Datacenter
Windows Server 2012 R2 Standard Evaluation   NEXT Windows Server 2012 R2 Standard
Windows Server 2012 R2 Standard Evaluation   TOP Windows Server 2012 R2 Datacenter
Windows Server 2012 R2 Standard   NEXT/TOP Windows Server 2012 R2 Datacenter

 

Option No:1 (VB Script as an Application)

The first option is to use a VBscript and run it as an application, that gives a great logging and integration with the Task Sequence in MDT. The script uses a Custom property called UpgradeLevel (which can be set to either NEXT or TOP) that you needs to be added to CustomSettings.ini

Step By Step, kind of…

Download Script from : http://1drv.ms/TBO9Zw

Add the Custom property UpgradeLevel.

image

Import the Application in the Deployment Workbench.

image

Modify the Task Sequence (add a Set Task Sequence Variable Step)

image

Modify the Task Sequence (Add the Application)

image

Deploy a Server and check the logfile.

image

Option No:2 (PowerShell Script as an Application)

The second option is to use a PowerShell script instead, still running as an application, I added some logic to discover the presence of a Task Sequence, that way logging can end up in the correct location

Step By Step, kind of…

Download Script from : http://1drv.ms/TBOgEn

Add the Custom property UpgradeLevel.

image

Import the Application in the Deployment Workbench

image
The command line is a bit long so here it is in text form
PowerShell.exe -ExecutionPolicy Bypass -File Upgrade-SKU.ps1 -UpgradeLevel %UPGRADELEVEL%

Modify the Task Sequence (add a Set Task Sequence Variable Step)

image

Modify the Task Sequence (Add the Application)

image

Deploy the server and check the logfile.

image

Option No:3 (PowerShell Script in TaskSequence)

The third option is to run it as a PowerShell task Sequence

Step By Step, kind of…

Download Script from :http://1drv.ms/1qjoOAk

Save the script in the scripts folder

Modify the Task Sequence (Run PowerShell script)

image

Modify the Task Sequence (Add a reboot Action)

image

Deploy a server and check the logfile.

image

/mike

Posted in MDT, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2 | Tagged: , , | Leave a Comment »

Back to Basic: .NET Framework 4.5.2 deployment in MDT using a VB Script wrapper

Posted by Mikael Nystrom on June 27, 2014

I got a tweet, it said “Why doing 4.5.1 when 4.5.2 is out”. So, this is just an update of the 4.5.1 post you can see here. http://deploymentbunny.com/2014/06/24/back-to-basic-net-framework-4-5-1-deployment-in-mdt-using-a-vb-script-wrapper/

How to Use it

Step 1: Download it

Download it from here: http://1drv.ms/TDbKJC

Step 2: Import it as an Application

Using the Deployment Workbench, import the application with the following options:

  • Application Type:
    • Application with source files
  • Details:
    • Application Name: Install – Microsoft .NET Framework 4.5.2
  • Source:
    • Source Directory: The location where you unzipped the files
  • Destination:
    • Directory Name: Install – Microsoft .NET Framework 4.5.2
  • Command Details:
    • Command Line: cscript.exe Install-NetFramework452.wsf

If you prefer PowerShell to import the application, here is an example POSH Snippet:

Import-Module "C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1"

New-PSDrive -Name "DS001" `
-PSProvider MDTProvider `
-Root "E:\MDTBuildLab"

import-MDTApplication `
-path "DS001:\Applications\Install" `
-enable "True" `
-Name "Install – Microsoft .NET Framework 4.5.2" `
-ShortName "Install – Microsoft .NET Framework 4.5.2" -Version "" `
-Publisher "" `
-Language "" `
-CommandLine "cscript.exe Install-NetFramework452.wsf" `
-WorkingDirectory ".\Applications\Install – Microsoft .NET Framework 4.5.2" `
-ApplicationSourcePath "C:\Users\Administrator\Desktop\Install – Microsoft .NET Framework 4.5.2" `
-DestinationFolder "Install – Microsoft .NET Framework 4.5.2" `
-Verbose

Step 3: Download .NET framework 4.5.2 exe file and save it in the Application\Source folder

Download from http://www.microsoft.com/en-us/download/details.aspx?id=42642

Step 4: Modify the Task Sequence

Open your task sequence and add the application like this:

image

Sample of a Windows 7 task sequence with .NET Framework 4.5.2

image
Sample of a Windows 8.1 task sequence with .NET Framework 4.5.2

Note: You might need to add a reboot before and one after, since .Net Framework might feel better, my sequence does not need it, but yours might depending on what you add before this.

Note: For Windows 8/8.1 (Server 2012/2012 R2) I always add .NET 2/3 as Roles BEFORE adding 4.5.2, just to make sure nothing is messed up.

Step 5: Create your Ref Image

/mike

Posted in MDT, OS Deployment, OSD, Reference Image | Tagged: , | 7 Comments »

Back to Basic: .NET Framework 4.5.1 deployment in MDT using a VB Script wrapper

Posted by Mikael Nystrom on June 24, 2014

Yesterday an OS Deployment friend (you know who you are…) asked around for a way to install .NET Framework 4.5.1 as a part of the reference image creation and I told him I would post it today, so here it is. The reason I do this with VB script wrappers (not only me, most of the people I know and works with OSD does that) is logging and full control, but also the fact that I have a bunch of VBscripts that are very similar and the fact that MDT has a very nice module called ZTIUtility that connects external scripts built in functions make this a very easy choice.

Hey, you might need 4.5.2 instead? –> http://deploymentbunny.com/2014/06/27/back-to-basic-net-framework-4-5-2-deployment-in-mdt-using-a-vb-script-wrapper/

How to Use it

Step 1: Download it

Download it from here: http://1drv.ms/TqAqVD

Step 2: Import it as an Application

Using the Deployment Workbench, import the application with the following options:

  • Application Type:
    • Application with source files
  • Details:
    • Application Name: Install – Microsoft .NET Framework 4.5.1
  • Source:
    • Source Directory: The location where you unzipped the files
  • Destination:
    • Directory Name: Install – Microsoft .NET Framework 4.5.1
  • Command Details:
    • Command Line: cscript.exe Install-NetFramework451.wsf

If you prefer PowerShell to import the application, here is an example POSH Snippet:

Import-Module "C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1"

New-PSDrive -Name "DS001" `
-PSProvider MDTProvider `
-Root "E:\MDTBuildLab"

import-MDTApplication `
-path "DS001:\Applications\Install" `
-enable "True" `
-Name "Install – Microsoft .NET Framework 4.5.1" `
-ShortName "Install – Microsoft .NET Framework 4.5.1" -Version "" `
-Publisher "" `
-Language "" `
-CommandLine "cscript.exe Install-NetFramework451.wsf" `
-WorkingDirectory ".\Applications\Install – Microsoft .NET Framework 4.5.1" `
-ApplicationSourcePath "C:\Users\Administrator\Desktop\Install – Microsoft .NET Framework 4.5.1" `
-DestinationFolder "Install – Microsoft .NET Framework 4.5.1" `
-Verbose

Step 3: Download .NET framework 4.5.1 exe file and save it in the Application\Source folder

Download from http://www.microsoft.com/en-us/download/details.aspx?id=40779

Step 4: Modify the Task Sequence

Open your task sequence and add the application like this:

image

Sample of a Windows 7 task sequence with .NET Framework 4.5.1

image
Sample of a Windows 8.1 task sequence with .NET Framework 4.5.1

Note: You might need to add a reboot before and one after, since .Net Framework might feel better, my sequence does not need it, but yours might depending on what you add before this.

Note: For Windows 8/8.1 (Server 2012/2012 R2) I always add .NET 2/3 as Roles BEFORE adding 4.5.1, just to make sure nothing is messed up.

Step 5: Create your Ref Image

/mike

Posted in MDT, OS Deployment, OSD, Reference Image | Tagged: , | 7 Comments »

Nice to Know–Combine multiple application for multiple OS versions into one Bundle

Posted by Mikael Nystrom on June 18, 2014

A customer asked me:

“Mike, I’m deploying Windows 7 and Windows 8.1 and in some cases there is different versions of applications for different versions of the OS, but I would like to use Mandatory Applications in customsettings.ini based that is tied to model?”

That is a scenario that is rather easy to fix, however it can be fix in many different ways. Scripting is one, rerunning the gather step and use conditions based on other way, using OSVersionNumber is another. It could also be the situation that you for a reason is running Windows 7 x86 and Windows 8.1 x64 as your two different operating system and therefor you have different applications, but you would like to be able to have only “one” application. That way you can still use rules to deploy the application or you would make it easier for the technician that performs the deployment of the client. But here is one other trick:

Using Bundles with conditions

Let us assume that you are deploying Windows 7 and Windows 8.1 to a certain hardware model and that hardware requires a certain software and that the software comes in two different versions then you can do the following:

  • Import the Windows 7 and Windows 8 application.

    image
    My two applications imported into Deployment Workbench.

  • Set the conditions for each application

    image
    Conditions for the Windows 7 x86 application.

    image
    Conditions for the Windows 8.1 x64 application.

  • Hide the Applications

    image
    The “Install – Software for Model X – Windows 8.1 x64” has been hidden, repeat for the Windows 7 x86 application.

  • Create a bundle application
  • Add the both applications as dependences.

    image
    Both applications have been added to the bundle.

If you install the bundle only one of the applications will be installed, since the dependences have conditions that does not overlap.

Using Customsettings.ini and MandatoryApplications to install each application for the correct operating system.

If you modify the rules in LiteTouch (customsettings.ini) you can now based on model use the bundle GUID instead of having to use two applications

image
Using MandatoryApplications001 with the GUID from the Bundle and installing it based on Model.

/mike

Posted in Deployment, Lite Touch, MDT | Tagged: | 2 Comments »

Nice to Know – How to speed up PXE boot in WDS and SCCM

Posted by Mikael Nystrom on June 18, 2014

“I feel the need, the need for more speed” does make sense to me.

By changing the TFTP package size between the client and the PXE server you could achieve that.

So, if you really like speed and performance you might want to read a post that could help you.

How to speed up PXE boot in WDS and SCCM

During a PXE boot, when the boot image file is being loaded in the client, it should not take any longer than a few minutes time depending on the size of the boot.wim and your network. If it seems that your PXE boot times are extremely slow, you may be able to speed up the process by increasing the TFTP block size. This article will show you how to speed up PXE boot in WDS and SCCM.

Follow the steps below to increase the TFTP block size in both a WDS and SCCM 2007 environment.

Read rest of the blog here
by Frank Trout at http://windowsdeployments.net

 

 

Posted in MDT, OS Deployment, OSD | Tagged: | Leave a Comment »

OSD–Using ZTISendMail to send email in a LTI/ZTI task sequence

Posted by Mikael Nystrom on June 13, 2014

Long time ago I had a need to send email an email in the end of the task sequence to notify the technician that the OS deployment was done, therefore creating a script which then ended up as a blog post at Deployment Research about two years ago. This week I’m running a Mastering Windows 7 and 8.1 OS Deployment using Lite Touch and Zero Touch in Minnesota and there where some requests on the subject so I decided to create a new version of the script and this time it is a PowerShell script instead. One of the request was to be able to send and email to the administrator that does the deployment (in Lite Touch) using the login name, so that need to to be taken under considerations to.

The script is tested in MDT 2013 but should work perfect in MDT 2012 Update 1 as well and it works when deploying Windows 8 and above.

Lite Touch

First you need to download the script and sample customsettings.ini  from here http://1drv.ms/1kvmobn and store the PowerShell it in the MDT Scripts folder.

Option Number One: Using the UserID directly

Update the CustomSettings like this. (you can copy and paste from the sample customsettings.ini files)

The name used to login to the LTI Wizard is defined as UserID and that is then used as a part of the email address to send it to.

image

Option Number Two: Using the UserID with translation.

In this case we create a section for every user account that should have an email an can logon. As an example, if you login as Administrator (don’t use that account!) an email would be sent to administartor@viamonstra.com, but you can have any other setting for that userID if you liketo.

Update the CustomSettings like this. (you can copy and paste from the sample customsettings.ini files)

image

Add a step in the TaskSequence.

image

Zero Touch

First you need to download the script and sample customsettings.ini  from here http://1drv.ms/1kvmobn and store the PowerShell it in the MDT Package Scripts folder.

In the ZTI we don’t really have a UserID and therefore we just send the email to a predefined email address and cc to an other.

Update the CustomSettings like this. (you can copy and paste from the sample customsettings.ini files)

image

Add a step in the Task Sequence like this.

image

Update the settings package and the MDT Package.

If you need a SMTP server to test against, read this http://deploymentbunny.com/2014/06/12/nice-to-knowa-simple-and-small-smtp-mailserver-fr-devlabtest-smtp4dev/

image

/mike

Posted in ConfigMgr, Deployment, Lite Touch, MDT, OS Deployment, OSD, SCCM, Zero Touch | Tagged: , , , , | 4 Comments »

 
Follow

Get every new post delivered to your Inbox.

Join 3,939 other followers