How to Copy Folders in MDT Like a Boss (The Easy Way) !

Yeah, This script is hella cool. Ever need to get MDT to copy folders? Course you do: That’s why you’re here. Instead of writing a separate and new script every time you need a folder copied, just use this script I found last week. It really does make this part easy.

SEE: http://blog.coretech.dk/mip/making-file-copy-easy/

Thanks to this glorious, glorious script courtesy Mr. Michael Petersen’s brilliant site: blog.coretech.dk, You Too Can Copy Folders in MDT Like a Boss! (The Easy Way).

So, since half of what makes building images a pain is that half of what you’re doing is nothing more than copying folders; make it easy. Sometimes, these folders don’t already exist (Bummer)

Here’s what you need. The greatest MDT Folder Copy Script Ever Written: http://blog.coretech.dk/download/CopyFiles.zip

Then copy the folder to %SCRIPTROOT%\ and rename the folder to whatever, in this case, I am moving a folder of backgrounds for the UseOEMBackground Feature in a Windows 7 image building task sequence.

CopyWallpapers

Copy it to your folder that needs to be copied on your Deployment Share.

Run it from your task sequence by adding a custom step or just copy any step that calls from scriptroot.

To copy an entire folder…

cscript.exe %ScriptRoot%\Folder\CopyFiles.vbs c:\TEST

Simply change C:\Test to whatever folder you need to create in the deployed system, it’s that easy.

Go get some tacos now that half of your image building process has now been automated.

SEE: 2016 Update: https://mdtguy.wordpress.com/2016/08/03/still-writing-scripts-to-copy-files-yeah-dont-do-that/

Advertisements

Delaying Domain Join When Legal Notices Break MDT AutoLogin

Sometimes Group Policy Breaks MDT. Policies such as Rename Administrator or a GP Install will break the glorious automation of MDT. Most commonly however, it’s those pesky legal disclaimers that tin foil hat wearers just love. These little warnings will bring your beautiful task sequences to a screeching halt.

See, MDT after imaging will need to login to the default local administrator account to run windows updates, install applications, update those apps, and apply local policies and perform the final cleanup. Often these steps can require several reboots, and having to click okay to some legal disclaimer every reboot kinda defeats the whole purpose of having MDT around in the first place.

There are several documented workarounds for this problem, the simplest of which is to turn off these warnings, because they don’t really do much good, but since they’re usually the idea of management, its not a fight worth having. So the next solution is to disable the domain join until the very end by hacking your unattended.xml file and moving recover to the domain to the very end, which is a little better. I’ve also read about staging OUs and hacks to GP using WMI filters, and all kinds of not so fun stuff, but there’s a pretty simple and easy way to teach MDT to “remember” this information, and join at the end still.

Until today when dealing with this very issue, I forgot about this excellent workaround I found over a year when I was doing IT for a large Business Solutions Provider here in Albuquerque.

Avoiding Legal Disclaimers That Break MDT

The idea here is simple, you’re going to comment out two lines of code from the TZIDomainJoin.wsf file in your MDT Scripts folder, and add logic to your customsettings.ini to store the domain information as a variable, and create a temporary task sequence that you’re going to override with a version that has steps that have logic to deal with this, and then copy those steps to your task sequence, I know it sounds complicated, but it works, and is worth doing.

268474
These and MDT do not play well together.

Before
Find The ZTIDomainJoin.wsf file in your scripts folder.

AFTER
Comment Out Two Lines, 189 and 190

TEMP
Create a temporary Task Sequence, and overwrite the xml with the xml provided by the link above.

TS2
Copy and Paste the Save Join and Restore Join Steps into your Task Sequence..

Note The save occurs in the Pre-Install Phase just before Configure. Restore Join Domain occurs at the very end of the task sequence, pretty much just before we run Recover From Domain at the very end. This way MDT joins to the domain, and you don’t have to worry about

Click the link below for the complete workaround, and the custom XML to use, but it works like a champ.

See: Avoiding Legal Disclaimers That Break MDT

Ask MDT Guy: Thin Images with MDT

Today I got a fantastic question from a reader, Scott: “Why is it better to let a task sequence install software instead of including it on the image to start with?” See my answer here on the Ask MDT Guy page.

Death to Bing Bar!

As some of you may know, I’m a huge fan of using MDT to automate the building of images. This automation saves time and means that I can simply rebuild my hybrid images quarterly or monthly if I need to, all with significantly reduced user error.

However, a few months back for some reason the windows update site started pushing the Bing Bar during image build and during subsequent deployments.

I know, in a perfect world, we could just block these updates via WSUS if our deployment share was configured to look at the WSUS server, but not all of us are as lucky. So check your BDD.log file, determine the KB number of the offending update, (Bing Bar 7.2 in this case) and copy the following code to the CustomSettings.ini file.

WUMU_ExcludeKB001=2673774

If you wanted to add another update to block you would just add another line with WUMU_ExcludeKB002= and whatever the KB is of what you’re trying to block.

Deploy Windows 8.1 and Office 2013 with MDT 2013 and the ADK 8.1

I’ve gotten several requests now for a step by step guide on rolling out Windows 8.1 with Office 2013 using MDT 2013, so I figured I’d take some time to outline what you’ll need to do to make that happen. This of course assumes you have at the very least an ISO of Win 8.1, a copy of Office 2013 and respective MAK keys for both. This guide is in three parts; Build, Configure, & Deploy.

It’s important to note something here: If you’re at all new to the Microsoft Deployment Toolkit, you’re gearing up to build some super slick “custom image” right away, but If you’ve never deployed with MDT before, you want to learn to push the stock image from the CD. Learn to walk before you run. You don’t need an image to get started, there’s one already in the .iso you have in your hands inside the sources folder. I’ll show you how to import that into MDT here shortly, don’t worry about making a super slick image just yet, just focus on understanding how MDT works, because we’re going to use it to build our images too…

Another thing that throws some newcomers off is a driver management model called “Total Control” The idea here is actually pretty simple, we’re going to build our reference image in a Virtual Enviroment without drivers, and let MDT inject drivers based on the make and model it detects at deploy time.

Build – Laying the foundation

  • Acquire Windows 8.1 and Office 2013 Media
    • Extract ISOs (preferably to server)
  • Download MDT 2013 & ADK 8.1
  • Download & Extract Driver Packs for your hardware
  • Install ADK 8.1 and MDT 8.1
  • Create Build Share
    • Import The OS
    • Add Office 2013 to Applications
      • Import as Application with source files
      • setup.exe /config ProPlus.WW\config.xml
    • Configure Office 2013
      • Accept EULA and set display to none
      • Launch Office Customization Tool
        • Set Installation Options
        • Set Shortcuts
      • Save to Updates
      • Add any any other updates to the updates folder
    • Create Standard Client Task Sequence
      • Add LTI Suspend in State Restore
      • Enable Updates in Task Sequence
    • Configure Advanced Share Properties
      • Set Platforms
      • Set Scratch Space
      • Set WinPE Wallpaper (Optional)
    • Tweak Boot.ini & CustomSettings.ini files
      • Set Skip BDDWelcome in Boot.ini AND CustomSettings.ini
      • Set Skip UserData to Yes
      • Set Skip Capture to No
      • Set Skip Timezone & Locale
  • Update Share
  • Configure Share Security Settings
  • Create a Reference Image
    • Create a Virtual Machine
    • Set Boot Media
    • Boot to VM and Authenticate
    • Set to Capture
    • Configure OS (Create Default User Profile)
    • Resume and Capture Image

Configure – Test & Retest

  • Create Production Share
    • Import The Reference Image
    • Create Driver Folder Structure using MAKE\MODEL
    • Import Drivers
    • Create Task Sequence
      • Enable Updates
      • Set Driver Path Variable Using %MAKE%\%MODEL% in PostInstall
      • Add Windows Activation Step into Task Sequence
      • Add Office Activation Step into Task Sequence
    • Tweak Unattended.xml File
      • Set taskbar and start menu shortcuts in specialize pass
      • Set Copy Profile = true in specialize pass
    • Configure Advanced Share Properties
      • Set Platform
      • Set Scratch Space
      • Set WinPE Wallpaper (Optional)
      • Enable Monitoring
    • Tweak Boot.ini & CustomSetting.ini files
      • Set Skip BDDWelcome in Boot.ini AND CustomSettings.ini
      • Set to skip Locale
      • Set to skip time zone
      • Enable Generic Logging
      • Enable Dynamic Logging
    • Update Share
    • Configure Share Security Settings
      • Set Entire Share Permissions – Group/Read
      • Set Logging – Group/Write

Deploy – Watch the Puppets Dance!

  • Prepare Boot Media
    • If using USB: Use Microsoft’s USB Boot Tool
    • If using CD: Burn the ISO
    • If using PXE: Upload boot.wim to WDS server
  • Boot to image from Production Share Media and Deploy Images to Production Systems

MDT 2013 Troubleshooting Guide

Like many of you I was underwhelmed by the lack of new features in MDT 2013. In many regards, the biggest change is not what it adds in functionality, but more of what’s been removed. MDT 2013 has no support for the legacy WAIK tools and hence, no more support for Vista and XP. I was however then pleasantly surprised to find then that the optional MDT Documentation contained a much needed Troubleshooting Reference complete with LTI and ZTI flowcharts which can be downloaded here…

MDT-Troubleshooting

http://download.microsoft.com/download/B/F/5/BF5DF779-ED74-4BEC-A07E-9EB25694C6BB/MDT%202013%20Documentation.zip

Topics Include:

  • Log Files
  • Error Codes
  • Advanced Troubleshooting

Make sure to sit down and spend some time trying to understanding this material. Its one of the best things to come out with MDT 2013. Note it also has some pretty awesome flowcharts as well, I do love me some flowcharts…

Updated CustomSettings.ini Tips & Tricks

I went in today and updated my most popular article mdt-2012-customsettings-ini-tips-tricks.

I added information on WUMU exclusions , Driver Paths and cleaned up the formatting.