The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…

  • about.me

    Mikael Nystrom

    Mikael Nystrom

    OS Deployment Geek, Virtualization and System Center

    Mikael Nystrom is a Microsoft MVP and Principal Architect at TrueSec

  • Archives

  • Meta

Archive for the ‘MDT’ Category

Back to Basic – CustomSettings.ini – Converting Desktop and Laptop computer types into Roles

Posted by Mikael Nystrom on May 22, 2015

So, someone asked me(you know who you are) if it is possible to convert something like a computer types into a role, and yes that is possible and some times a pretty smart thing to do. If you have basically to kind of roles in your org and they are based on the fact that the computer is a Laptop (like a field engineer) or a Desktop (like a standard office user), well then it should work.

Converting Computer types into Roles:

In the Priorityline we have ByDesktop,ByLaptop,Role and Default

We use [ByDesktop] to return a value of yes/no and we store that in IsDesktop-Yes if it is a desktop and then we send it to a section with the name of IsDesktop-Yes. In the section [IsDesktop-True] we assign it the Property Role001 to ComputerIsDesktop. Now we can create a role in customsettings.ini, or we could create a Role in the MDTdatabase if you would like that instead and then assign all settings to that. In this case we will create a Role section called [ComputerIsDesktop] and in that role we will define all settings for that role, in this case it will be an application and then we repeat that story for a laptop.

image
Sample CustomSettings.ini file

image
Output from testing the customsettings.ini file and as you can see it has been assigned the role correctly and since it is a laptop it will get the laptop app.

You can download the sample ini files here: http://1drv.ms/1LiIw7H

The UserAlias Userexit script is here: http://1drv.ms/1LiIVHh

Instructions on how to test customsettings.ini is here:https://anothermike2.wordpress.com/2011/04/27/quick-and-dirty-testing-customsettings-ini-variables-in-mdt/

Posted in ConfigMgr, MDT, OSD | Tagged: , , , | 1 Comment »

Back to Basic – CustomSettings.ini – Converting Model and ModelAlias into Roles

Posted by Mikael Nystrom on May 22, 2015

So, someone asked me(you know who you are) if it is possible to convert something like a computer model into a role, and yes that is possible and some times a pretty smart thing to do. It becomes really great if you are using the ModelAlias Userexit script and you would like to use the database to define settings. The database has support for make and model, but since you are using modelalias instead of make and model, well then you can define settings as a role instead. The only thing you need to do is to convert the ModelAlias value into a Role and you are done. In this post I will describe two scenarios, one when you convert model into a role and the other is when you turn the modelalias into a role.

Converting Model into a Role:

In the customsettings.ini file we have three sections in the priority line: ConvertModelToRole,Role,Default and one customproperty just for fun

  1. ConvertModelToRole – will set the Role001 into RoMo-“the return of the model”
  2. Role – will search for a section with the name of RoMo-“the return of the model”
  3. Default – set default values

image
Sample CustomSettings.ini file

image
The output when running ZTIGather.wsf to test the inifile.

Converting ModelAlias into a role:

In the customsettings.ini file we have four sections in the priority line: HardwareInfo,ConvertModelToRole,Role,Default

  1. HardwareInfo – will execute the modelalias userexit script and return a value from that script
  2. ConvertModelToRole – will set the Role001 into RoMo-“the return of the model alias user exit script result”
  3. Role – will search for a section with the name of RoMo-“the return of the model alias user exit script result”
  4. Default – set default values

image
Sample CustomSettings.ini file

image
The output when running ZTIGather.wsf to test the inifile.

You can download the sample ini files here: http://1drv.ms/1LiIw7H

The UserAlias Userexit script is here: http://1drv.ms/1LiIVHh

Instructions on how to test customsettings.ini is here:https://anothermike2.wordpress.com/2011/04/27/quick-and-dirty-testing-customsettings-ini-variables-in-mdt/

/mike

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

Nice to Know – Windows 10 OS Deployment links

Posted by Mikael Nystrom on May 1, 2015

Here are the basic media you need to start Windows 10 OSD.

Windows ADK RC for Windows 10

image

https://msdn.microsoft.com/en-us/windows/hardware/dn913721(v=vs8.5).aspx

(Note: it will be located at the last part of the page)

Windows 10 Insider Preview ISO April Update

image

http://windows.microsoft.com/en-us/windows/preview-iso-update-1504

Windows 10 Enterprise Insider Preview

image

https://www.microsoft.com/en-us/evalcenter/evaluate-windows-enterprise-insider-preview

MDT 2013 Update 1 Preview

image

https://connect.microsoft.com/ConfigurationManagervnext/Downloads/DownloadDetails.aspx?DownloadID=57061

/mike

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

My Sessions at Microsoft Ignite 2015

Posted by Mikael Nystrom on May 1, 2015

Banner for Ignite 2015

Hands-on Windows 10 Enterprise Deployment

Want to know how to prepare for Windows 10, or how to upgrade from Windows 7, 8, or 8.1 to Windows 10? Maybe you want to know how to build, customize, and deploy your own Windows 10 image? In this pre-day session we explore all of those areas, with hands-on labs to ensure that you’ll be ready for Windows 10 in your organization.

Sunday, May 3rd  – 9:00 am to 5:00 pm

Troubleshooting Windows 10 Deployment: Top 10 Tips and Tricks

Need help with troubleshooting Windows deployment issues? Johan and Mikael share lessons learned around handling device drivers in the deployment process, common deployment issues and their workarounds, parsing log files, WinPE and PXE troubleshooting, UEFI deployments. As a foundation, Microsoft Deployment Toolkit and Microsoft System Center Configuration Manager will be used. You can expect a lot of live demos, tips, and tricks in this session.

Wednesday, May 6th – 10:45 am to 12:00 pm

Expert-Level Windows 10 Deployment

Join us for a live demo on how to build a Windows deployment solution, based on Microsoft System Center Configuration Manager. In the session we are taking OS Deployment in Microsoft Deployment Toolkit and System Center Configuration Manager to its outer limits. Deployment tips, tricks, and hard core debugging in a single session. You can expect a lot of live demos in this session.

Thursday, May 7 7th – 9:00 pm to 10:15 pm

Windows 10 Deployment: Ask the Experts

Still have questions about Windows deployment, even after all the other sessions this week? For this session, we gather as many experts as we can find for a roundtable Q&A session, with plenty of “official” and “real-world” answers for everyone, troubleshooting and implementation advice, and probably a fair number of opinions and “it depends” answers as well.

Thursday, May 7 7th – 3:15 pm to 10:15 pm

Book signing in the Bookstore

If you for any reason would like to have a book written by me signed, I’ll be there and I will happily sign it for you:

Wednesday, May 6th – 12:30 pm

Posted in ConfigMgr, Deployment, Event, Ignite, MDT | Tagged: , , , , , , , | Leave a Comment »

Nice to Know – Reset the WSUS update Count during OSD, allows automatic reinstallation of patches that failed

Posted by Mikael Nystrom on March 30, 2015

No, this is NOT something new, its just that it needs to be spread more…

In MDT 2010, there were some improvements to the ZTIWindowsUpdate.wsf script, the reason as to cut down time, they did and at the same time ZTI was not as reliable as it used to be. The issue is very simple, the task sequence remembers all patches that has been installed, so it will never ever re-install a patch and that is great, unless a patch needs to be reinstalled and it might need to…

Alexey (with help from Keith) did create a script in mars 2010 that resets the counter. You can find the blog post here http://blogs.msdn.com/b/alex_semi/archive/2010/03/17/ztiwindowsupdate-wsf-does-not-install-all-patches.aspx. The script you download from my site, does the same thing, the script is just slightly polished…

How to use it?

  • Download http://1drv.ms/1CqmjBN, Unzip and store the script in the Scripts folder of the MDT share
  • Modify the task Sequence:
  • Add a “Run Command Line” with the following command
    • cscript.exe "%SCRIPTROOT%\ZTIWindowsUpdateReset.wsf"

It should look something like this:

image

/mike

Posted in MDT | Tagged: | Leave a Comment »

Nice to Know – Reset WSUS to “Factory Default” settings after OSD in MDT

Posted by Mikael Nystrom on March 30, 2015

Same days a go I write a post on how to reset WSUS after OSD in MDT, but of course a very good friend was complaining slightly, it was something “Yeah, great but I would like to reset WSUS back to it has never ever been used, like a factory reset…”

Since I’m a nice guy, here it is, the WSUS Factory Reset application for MDT.

So, same story, download(http://1drv.ms/1IKrIFY), unzip and import as an application, like this.

image

Then add it as an application in the MDT Task Sequence, something like this.

image

/Mike

Posted in MDT | Tagged: | 3 Comments »

Nice to Know – Reset WSUS settings after OSD in MDT

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.

image

Then add it as an application in the MDT Task Sequence, something like this.

Download : http://1drv.ms/1bwlwXm

image

/mike

Posted in MDT | Tagged: | 2 Comments »

OSD – Install IE 11 in the ref image like a pro using a PowerShell wrapper

Posted by Mikael Nystrom on January 27, 2015

One of the best ways to get ready for Windows 10 is to deploy Internet Explorer 11 in your current environment, if you can make IE 11 work there is a huge chance that you will have no or just a few issues when Windows 10 is about to be deployed.

The best way to do that is to add IE 11 to the reference image when you are replacing, refreshing or perform a bare-metal deployment and the next best thing is to deploy it using any software distribution engine, like WSUS, ConfigMgr, Intune or something like that.

Even if you distribute it as a software, you should still update your reference image and here it is.

Step No:1 – Download IEAK

The best way to deal with IE11 is to create a configuration only package for all Windows versions that already have IE11 installed (Like Windows 8.1 or Windows Server 2012 R2) and create a full install package for all the other versions of Windows you are using in your organization and that is done by Internet Explorer Administration Kit (IEAK), just download it from https://technet.microsoft.com/en-us/ie/bb219517.aspx and install on a computer WITH IE11 already installed.

Step No:2 – Create all packages

Start IEAK and create all your packages for each version and each language of IE you would like to have

  • Windows 7 SP1 x86/x64
  • Windows 8.1 x86/x64

(Create both full install package as well as as configuration packages)

Step No:3 – Download the PowerShell script

After creating all the packages, with the customized settings you will have a folder structure with full packages as well as configuration only for one or more language and instead of creating one application for each of these packages you can create one application in the deployment workbench that will figure out which package that should be installed.

  1. Download the PowerShell script from http://1drv.ms/15EELL8
  2. UnZip it and browse to the folder “Install – Internet Explorer 11\Sorurce”
  3. Copy the content of you “build” folder that was created when using IEAK into the folder named “Source”, it should contain folder names like “BrndOnly”,”FLAT” and “Ins”

image
This is the tree structure after copying the files.

Step No:4 – Create the Application in the Deployment Workbench

No you need to create the application, follow these steps and you are done.

  1. Open Deployment Workbench and browse to the Application node
  2. Create a new application named “Install Internet Explorer 11” with the Command Line “PowerShell.exe -ExecutionPolicy ByPass -File Install-InternetExplorer11.ps1”

image
The properties of the “Install – Internet Explorer 11” application in the Deployment Workbench.

Step No:5 – Add the application to the Task Sequence

Open your task sequence and add the application to the task sequence.

image
Install Internet Explorer 11 is added to the Task Sequence.

Happy OSD
/mike

 

Posted in Internet Explorer, MDT, OS Deployment, OSD | Tagged: , , | 1 Comment »

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: , , , , , , | 3 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 »

 
Follow

Get every new post delivered to your Inbox.

Join 5,176 other followers