I thought this was confusing, so I figured if it helps one person it is worth posting!
In order to do a WMI query for items that are NOT of a certain definition (for example, machines models that do not begin with “M”), you may think that you would include “NOT LIKE” in your query. The truth is, your query should look like this:
SELECT * FROM Win32_ComputerSystemProduct WHERE NOT Version LIKE “%M%”
If you want to automate new user creation with SCSM 2012 SP1 and Orchestrator 2012 SP1 (or R2, for that matter), follow this: http://syscen.blogspot.com/2012/01/automating-new-user-creation-with-scsm.html
So, I heard that you were trying to capture a base Windows 8 image for deployment. You are at least using MDT 2012 Update 1, correct? Good! What’s the problem, then? I see…on your reference machine, you are receiving an error message that contains “ZTI error: unhandled error returned by LTIApply: Not found (-2147217406 0x80041002)”.
Seriously, stop panicking. It is sort of unbecoming.
The issue is that the script is failing to check for the existence of the boot folder on the system partition before running a command called “takeown.exe,” which changes folder ownership. (NOTE: this does NOT occur if you are capturing a Windows 8 image that was originally deployed using MDT 2012 Update 1).
The fix, if you are so brave (just do it), is as follows:
- Open %DeployRoot%\Scripts\LTIApply.wsf and C:\Program Files\Microsoft Deployment Toolkit\Templates\Distribution\Scripts\LTIApply.wsf
- Locate the “copy bootmgr” section in both
- Add the following code above the copy bootmgr code:
If not oFSO.FolderExists(sBootDrive & “\Boot”) then
oFSO.CreateFolder(sBootDrive & “\Boot”)
Trying to be one of the cool kids, putting everything in the cloud? Well, who am I to stop you? I might as well help!
Here’s a link to a very good step-by-step guide on how to set up a cloud distribution point in SCCM 2012 SP1:
Need to create WMI queries but are not sure of which class to use and what properties are available? Well, today is your lucky day! The WMI Code Creator tool (developed by Microsoft) will make your life so much easier.
“I need to export all of my runbooks to Visio (or Word) for a report I am creating to give my superiors!”
Stay calm…Bruno Saille has the answer!
Here is a quick query to gather all of the machines that report as laptops in your environment:
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_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”, “14” )
If you want to change the system enclosure type, here is Microsoft’s list of chassis type codes:
4 Low Profile Desktop
5 Pizza Box
6 Mini Tower
11 Hand Held
12 Docking Station
13 All in One
14 Sub Notebook
16 Lunch Box
17 Main System Chassis
18 Expansion Chassis
19 Sub Chassis
20 Bus Expansion Chassis
21 Peripheral Chassis
22 Storage Chassis
23 Rack Mount Chassis
24 Sealed-Case PC