April 2011 - Posts
After completing steps 1-4 in my previous post you can continue on or download the below script to Automatically update your Default Boot Images to WinPE 3.1.
Required parameters are auto determined if possible and entered for you.
Required Method Parameters:
Architecture, ExportImagePath, ImageIndex
1) Supply Architecture Value: x86 or x64

2) If launched from Site server “expected” path will be auto-determined. (Change if required)

3) Enter Image Index if required.

4) If successful a Message Box will Prompt Confirming execution!

UpdateDefaultBootImage.zip
1) Download the Waik 3.1 Supplement from the following Link.
2) Extract the ISO on your Primary Site Server i.e. “E:\Waik3.1”
3) Open an elevated command prompt and enter the following cmd substituting your extracted ISO location and Waik install Directory like below.

4) Once Complete output should look similar to the below screenshot.

5) Next open wbemtest from an elevated cmd prompt and select Connect.

6) Type in the WMI Namespace for your Primary Site and select connect.
a. Site_PA1 should be changed to match your site code.

7) Next select Execute Method

8) Enter the SMS_BootImagePackage Object and select OK

9) Select ExportDefaultBootImage from the Method Dropdown box.

10) Next select Edit In Parameters

11) Select Hide system Properties to show only settings that need configured

12) Enter all fields like the below example:
a. Select Not NULL and enter Architecture = x86 or x64 then Save Property

b. Select Not NULL and enter the ExportImagePath = \\<site _server>\sms_<site_code>\OSD\boot\i386\boot.wim or \\site_server>\sms_<site_code>\OSD\boot\x64\boot.wim Then Save Property.

c. Select Not NULL and enter ImageIndex = 1 then Save Property

d. Next you have to Save Object

e. Now you can execute the method

f. If successful you should see the below popup.

13) Repeat step 12 for all boot images present.
14) Expand “Site Database –> Computer Management –> Operating System Deployment —> Boot Images” Right click the boot image and select properties then click on the Images Tab and click Reload

15) Select ok

16) Notice the OS Version has changed to 6.1.7601.17514 ensure Command line support is re enabled if required and drivers are added to the boot image.

17) Select ok then update the Distribution Points.
A question came up yesterday on the myITforum mailing list on how to view unapproved clients in ConfigMgr. I knew of an easy way to create a collection of those systems but Brian Mason responded with a very EASY way to setup an Auto Approval for unapproved clients using SQL Tasks in ConfigMgr. Below is the how to on setting up the SQL Task and some queries to view status of your unapproved systems.
Thanks goes out to Brian Mason for sharing this little gem! :)
1)
Expand Site Database --> Site Management -->
Site -->
Site Settings -->
Site Maintenance --> SQL Commands right click and select "New SQL Commands"
2)
Enter the Name, Query and Schedule like below or
to suit your needs.


Query:
UPDATE v_CM_RES_COLL_SMS00001
SET IsApproved=1
FROM v_CM_RES_COLL_SMS00001
INNER
JOIN v_R_System
ON
v_CM_RES_COLL_SMS00001.ResourceID = v_R_System.ResourceID
WHERE
v_CM_RES_COLL_SMS00001.IsApproved<>1
3)
All done now you have a scheduled SQL Task to
keep your clients approved. Optionally
if you would like to view status of your approved clients you could create an
SRS Report with the following SQL Query or with the below Collection Query:
SQL:
SELECT *
FROM v_CM_RES_COLL_SMS00001
INNER JOIN
v_R_System
ON
v_CM_RES_COLL_SMS00001.ResourceID = v_R_System.ResourceID
WHERE v_CM_RES_COLL_SMS00001.IsApproved<>1
Collection:
select
SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client
from SMS_R_System inner join SMS_CM_RES_COLL_SMS00001 on
SMS_CM_RES_COLL_SMS00001.ResourceId = SMS_R_System.ResourceId where
SMS_CM_RES_COLL_SMS00001.IsApproved<>'1'
Show some love to Johan & Mikael and check them out at TechEd and their upcoming Deployment roadshow I am sure you wont be disappointed! 
To all our deployment friends, readers of Deployment Fundamentals volume 1.
This is Johan and Mikael writing, we just wanted to let you know about a few opportunities to learn even more on Windows Deployment. In the US we will present at Microsoft TechEd in Atlanta, and in Europe we will be doing a deployment roadshow. Last but not least, Deployment Fundamentals now has a Facebook page.
Microsoft TechEd in Atlanta,
In addition to a few breakout sessions, Mikael is presenting PRC15 Mastering Windows 7 Deployments Using Windows Deployment Services and Microsoft Deployment Toolkit 2010 Lite Touch
In addition to a few breakout sessions, Johan is presenting PRC08 Unleash the Power of Microsoft System Center Configuration Manager 2007 OS Deployment
Deployment Roadshow in Europe
In May, we will be touring through Europe, presenting a full-day super-workshop, filled with tips & tricks from the real world on how to deploy Windows 7 and Office 2010. The Deployment Roadshow
Deployment Fundamentals now on Facebook
Also, please say hi to (and maybe “like”?) our new Deployment Fundamentals page on Facebook
The Logic in the ZTIGather.wsf script creates some awesome variables etc… that can be used during the imaging process with MDT Integration. A few of the neat ones are for chassis type and if a machine is a Virtual Machine or not. Wouldn’t it be kinda cool if you could see ahead of time what that logic looks like and if your machines would fall into one of these classifications? Well we have been doing that for years and most people are already doing it with query's, reports, collections etc.… I have just added the exact logic as close as I could find possible into some ConfigMgr Queries that you can add in and use!
Enjoy!
IsDesktop
select SMS_R_System.Name, SMS_R_System.SMSAssignedSites, SMS_R_System.IPAddresses, SMS_R_System.IPSubnets, SMS_R_System.OperatingSystemNameandVersion, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.LastLogonUserDomain, SMS_R_System.LastLogonUserName, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceId, SMS_R_System.NetbiosName from SMS_R_System inner join SMS_G_System_SYSTEM_ENCLOSURE on SMS_G_System_SYSTEM_ENCLOSURE.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SYSTEM_ENCLOSURE.ChassisTypes in ("3","4","5","6","7","15","16")
IsLaptop
select SMS_R_System.Name, SMS_R_System.SMSAssignedSites, SMS_R_System.IPAddresses, SMS_R_System.IPSubnets, SMS_R_System.OperatingSystemNameandVersion, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.LastLogonUserDomain, SMS_R_System.LastLogonUserName, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceId, SMS_R_System.NetbiosName from SMS_R_System inner join SMS_G_System_SYSTEM_ENCLOSURE on SMS_G_System_SYSTEM_ENCLOSURE.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SYSTEM_ENCLOSURE.ChassisTypes in ("8","9","10","11","12","14","18","21")
IsServer
select SMS_R_System.Name, SMS_R_System.SMSAssignedSites, SMS_R_System.IPAddresses, SMS_R_System.IPSubnets, SMS_R_System.OperatingSystemNameandVersion, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.LastLogonUserDomain, SMS_R_System.LastLogonUserName, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceId, SMS_R_System.NetbiosName from SMS_R_System inner join SMS_G_System_SYSTEM_ENCLOSURE on SMS_G_System_SYSTEM_ENCLOSURE.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SYSTEM_ENCLOSURE.ChassisTypes in ("23")
IsVM
select SMS_R_System.Name, SMS_R_System.SMSAssignedSites, SMS_R_System.IPAddresses, SMS_R_System.IPSubnets, SMS_R_System.OperatingSystemNameandVersion, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.LastLogonUserDomain, SMS_R_System.LastLogonUserName, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceId, SMS_R_System.NetbiosName from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Manufacturer in ("VMware, Inc.","Microsoft Corporation") order by SMS_R_System.Name

At my current client we are working on a Windows 7 Migration with Bitlocker enabled. One of the challenges is that during the Bitlocker Task Sequence step if media is still in the CD-Rom than an a message box is presented asking to remove before Bitlocker is enabled… We wanted a method to eject the CD-Rom if found so the process isn't halted until someone removes the disc. I did a quick search and found some AutoIT code to handle this very task. The EXE will look for any CD-Rom drives on the system and eject the tray. This also comes in handy if using boot cd’s and your technicians forget to remove the cd before delivering to ac client it will now be a little harder for them to forget if the tray is already open. Below is the code and a link to download the source and compiled executable. To run just add to your MDT Toolkit package and add as a general run command.
;//////////////////////////////////////////////////////////////////////
;//
;// ScriptName: EjectDrive.exe
;//
;// Author: Brandon A. Linton
;//
;// Purpose: Eject CD-Rom Drive
;//
;// Created: 04/04/2011 Ver 1.0
;//
;// Disclaimer: Use at your own risk no warranty or support provided.
;//
;// Source Code Found at Below Link Original Author Not Defined.
;// http://www.autoitscript.com/forum/topic/92974-cdtray-in-winpe/
;//
;//////////////////////////////////////////////////////////////////////
$aDrives = DriveGetDrive("all")
If Not @error Then
;MsgBox(4096,"", "Found " & $aDrives[0] & " drives")
For $i = 1 To $aDrives[0]
;MsgBox(4096,"Drive " & $i, $aDrives[$i])
If DriveGetType($aDrives[$i] & "\") = "CDROM" Then
$sDrive = StringUpper($aDrives[$i]) & "\"
ExitLoop
EndIf
Next
EndIf
$oShell = ObjCreate("Shell.Application")
$oShell.Namespace(17).ParseName($sDrive).InvokeVerb("Eject")
$iTimer = TimerInit()
While DriveStatus($sDrive) <> "NOTREADY" And TimerDiff($iTimer) < 10000
Sleep(10)
WEnd
Download Link: EjectDrive.zip
That’s right!!! Enhansoft has been giving away FREE SSRS Reports for ConfigMgr! Each month a new report is given away all you have to do is request the license key before the end of the month and its all yours.
I think everyone has to give Garth some credit for being the first to start providing free reports for SSRS and help get everyone migrated away from those old style nasty ASP Reports! Below are some screenshots of the installation process and what a sample report looks like. Hope everyone enjoys and heads over to http://www.enhansoft.com/index.aspx to check out some of their other offerings.
May’s FREE SSRS Report Link
1) Obtain Installer and License Key

2) Run the Enhansoft Report Setup installer and select Next.

3) Accept the license agreement

4) Import your license key and select Next.

5) Choose to create reports and where to store any documentation and select Next.

6) Confirm the Reporting Services Connection String and select Next.

7) Select the reports you would like to install and select Next.

8) Setup Completes Select Finish.

9) In the ConfigMgr Console you will now notice a NEW report folder called “Enhansoft Custom Reports”.

10) And you now have a shiny new SSRS Report!
