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

Posts Tagged ‘MDT’

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 »

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

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 »

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: , , , | 1 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: | 6 Comments »

 
Follow

Get every new post delivered to your Inbox.

Join 5,292 other followers