The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…

  • Archives

  • Meta

Posts Tagged ‘MDT’

Nice to Know – Yes, it is possible to copy items between to Task Sequences as well as copy items between 2 different deployment shares

Posted by Mikael Nystrom on November 11, 2014

This is NOT a new feature, I cant even remember how long this has been working, but this morning I saw a Tweet when someone was happy about the possibility to copy items between deployment shares in MDT, so for thoose that knows all this, you do not need to read more, for the rest of you.

Yes, you can copy items between Task Sequences

(it also works copy items within a Task Sequence)

This works in both MDT as well as in ConfigMgr.

image

image

image

Yes, you can copy items between Deployment Shares (Only for MDT, Lite Touch)

In this case I have 3 deployment shares in the Deployment Workbench and it is possible to copy all kind of items between these 3 deployment shares

image

Let us copy some application from one deployment share to another.

Select Application, right click and select Copy.

image

Browse to new location, right-click, select Paste.

image

The application has been copied to the new deployment share.

image

/mike

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

OSD – Using PowerShell Commands in UserExit VB script to extend the ZTIGather process during OSD

Posted by Mikael Nystrom on November 11, 2014

During todays session I realized that I have done a lot of OSD stuff, but never published it (shame on me), so time to work. First up is how to run PowerShell CommandLets inside a UserExit script. A UserExit script is an extension to the ZTIGather process, giving you the opportunity to extend the gather process with information that the Gather process does not cover. That has been possible for a long time, but VBscript is not really the easiest script language in the world, so I asked my self if it would be possible to use PowerShell inside the VBscript and of course it is!

The idea

The basic idea is to run the UserExit script from customsettings.ini as usual and then do a jump out into PowerShell, execute the PowerShell CMDLets, terminate and return the value into the VBscript, which then will be a value connected to a Custom Property in the gather process, which then can be consumed by customsettings.ini and/or the task sequence. you can download everything from here: http://1drv.ms/1u41Yj2

How-To

The Boot Image

The boot image must have support for PowerShell and you can get that by adding .NET and PowerShell

image
Lite Touch.

image
Zero Touch.

The Customsettings.ini file

The customsettings.ini file will direct ZTIGather to process the section called UserExits, which will execute the UserExit.vbs script, call the function called RunningPSCommand and return the value from that function into the property called PSCommand.

image
This is a sample of how the customsettings.ini file should look like to call the UserExit script.

The UserExit Script that runs PowerShell commands

The script is rather simple, basically the PowerShell command is a string, executed by PowerShell.exe and using Executor.StdIn.Close to close the window and then using Executor.StdOut.ReadAll to grab whatever you have in the window and put that in the RunningPSCommand, which then is returned back to the ZTIGather process as a value for the Property RunningPSCommand.

image

The result of running the ZTIGather

image

As you can see the PowerShell command was running and returned the value “Virtual Machine” and now the Property PSCommand is equal to Virtual Machine and can be used elsewhere in CustomSettings.ini or in the Task Sequence

/mike

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

OSD – Static IP Address does not work in Lite Touch using Offline Media

Posted by Mikael Nystrom on November 7, 2014

During a project Johan and was working a while ago, we used Offline Media and we had a problem to set a static IP Address during OSD. After digging Johan found the issue and here is the solution.

http://www.deploymentresearch.com/Research/tabid/62/EntryId/184/Fix-for-MDT-2013-offline-media-deployment-bug-Static-IP-addressing.aspx

image

/mike

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

PowerShell is King – Testing OS Deployment Web Services using PowerShell

Posted by Mikael Nystrom on November 2, 2014

Recently I was setting up Maik Kosters OS Deployment Web Services for a customer and I need to test them, sure, you can do that interactively directly by running them, but I wanted the “PowerShell” way to do it.

You can get the Web Services from Maik Koster here: http://mdtcustomizations.codeplex.com/documentation?referringTitle=Home

Testing a Web Services the Non PowerShell Way.

image
Browsing to the Web Services

image
Select the DoesComputerExists

image
Type in a value and Invoke.

Testing a Web Services the PowerShell Way.

Since PowerShell has the function built-in it is very much a no-brainer.

To connect and get all members from the Web Services execute this:

$ADWebS = New-WebServiceProxy -Uri http://MDT01/OSD/ad.asmx?WSDL
$ADWebS | Get-Member -Type Method

That will give you something like this back

image

To connect and get one member with some detail execute this:

$ADWebS = New-WebServiceProxy -Uri http://MDT01/OSD/ad.asmx?WSDL
$ADWebS | Get-Member -Name DoesComputerExist -Type Method | Format-List

That will give you something like this back

image

So, to test the DoesComputerExists with a value you can now execute the following:

$CompuerNameToTest = "MDT01"
$ADWebS = New-WebServiceProxy -Uri http://MDT01/OSD/ad.asmx?WSDL
$ComputerExistsInAd = $ADWebS.DoesComputerExist("$CompuerNameToTest")

Write-Host "The Computer $CompuerNameToTest exists in Active Directory: $ComputerExistsInAd"

So if the Computer Exists in Active Directory you should get something like this back

image

/mike

Posted in Lite Touch, MDT, OS Deployment, Zero Touch | Tagged: , , , , , , | Leave a Comment »

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: | 5 Comments »

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 »

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: , | 13 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 – 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 »

 
Follow

Get every new post delivered to your Inbox.

Join 4,172 other followers