So if you are using Microsoft System Center Configuration Manager (SCCM) and want to add your machines into different OU’s depending on whether they are laptops or desktops there are many ways you can do it. Probably the easiest way is to use MDT integration and then add a task sequence step condition to use the IsLaptop or IsDesktop task sequence variable:
IsLaptop equals “True”
IsDesktop equals “True”
This may not be suitable for all though, you may not have MDT integrated or you may want to go further than just laptop or desktop. Another option would be to use the machine name if the naming convention lends itself to this i.e. machines names L1234 or D1234. You would add a task sequence step condition again but this time for WMI query:
SELECT * FROM Win32_ComputerSystem WHERE Name LIKE “L%”
SELECT * FROM Win32_ComputerSystem WHERE Name LIKE “D%”
This is all fine if you have set the OSDComputerName task sequence variable at the beginning of the task sequence but this doesn’t work in all situations. In this case you can run a WMI query to detect the hardware type. This is a little different from the chassis type as you might know about as that can be sometimes difficult to use, especially with multiple manufacturers. My preferred method is as follows:
SELECT * FROM Win32_ComputerSystem WHERE PCSystemType = “1”
SELECT * FROM Win32_ComputerSystem WHERE PCSystemType = “2”
1 is for desktops and 2 is for laptops. If you want to combine types then you can add an If statement to your task sequence step options and then specify multiple WMI queries.
If you want to go further and have many kinds of machine then the full table of system types are here:
Value | Meaning |
---|---|
|
Unspecified |
|
Desktop |
|
Mobile |
|
Workstation |
|
Enterprise Server |
|
Small Office and Home Office (SOHO) Server |
|
Appliance PC |
|
Performance Server |
|
Maximum |
On an SCCM sequence, at which Task Sequence stage would you put any of these these on. I have tried “Apply Network Settings” on the options tab. However it’s not even joining the domain. Could you please advise further?
LikeLike
Have you tried using the ‘Join Domain or Workgroup’ step instead of apply network settings? I have also had issues with Apply Network Settings in the past.
LikeLike