Joing Computers to Different OU's in Domain
Would someone be able to instruct me on how to add laptops to one OU in my domain and desktops to a different OU in my domain during the deployment task sequence. In the Apply Network settings you only have the option to pick a single OU?BRL
October 30th, 2010 9:21am
Are you using MDT together with SCCM for your deployment solution? Then you can either use MDT to configure which OU the computer should be in during installation, or you can duplicate the Apply Network step and add a condition to them both, one for laptops
and one for desktops.
Using MDT you will have a task sequence variable that is called ISLAPTOP=true/false and ISDESKTOP=true/false which you can use to execute the correct apply network settings step.
If not using MDT you can do the same by using an WMI query to determine is the computer is a laptop or desktop, see
http://blogs.technet.com/b/heyscriptingguy/archive/2004/09/21/how-can-i-determine-if-a-computer-is-a-laptop-or-a-desktop-machine.aspx for more information on how to achieve that.
Hope it helps
Best Regards,
Jörgen---------------------------------------------------- visit my System center blog at www.ccmexec.com
Free Windows Admin Tool Kit Click here and download it now
October 30th, 2010 10:01am
Hi,
Using MDT would be the easiest as Jörgen pointed out. If you have no MDT then there's an option to run a custom script in a task before Apply Network Settings to evaluate a variable with chassis type.
I've used a script like this:
Dim oTaskSequence, oWMI, colChassis, sChassisType, oChassis
Set oTaskSequence = CreateObject ("Microsoft.SMS.TSEnvironment")
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set ChassisInfo = objWMIService.ExecQuery("Select * from Win32_SystemEnclosure")
For Each objChassis in ChassisInfo
For i = Lbound(objChassis.ChassisTypes) to Ubound(objChassis.ChassisTypes)
chassisInt = objChassis.ChassisTypes(i)
Next
Next
ChassisType = translateTypeID(chassisInt)
oTaskSequence ("chassisType") = ChassisType
Function translateTypeID(code)
Select Case code
Case "8", "10", "12", "14", "18", "21"
translateTypeID = "Laptop"
Case "23"
translateTypeID = "Server"
Case Else
translateTypeID = "Desktop"
End Select
End Function
This script evaluates a task sequence variable with one of following: "laptop", "desktop" or "server".
Then I make two Apply Network Settings tasks, one for laptops OU and another for desktops OU. Specify "Task Sequence Variable" condition for both tasks so that "chassisType" variable equals "laptop" for one and "desktop" for another.
October 30th, 2010 4:34pm
I believe I got this working using the MDT Toolkit Package just to verify I must include the Gather task sequence after the toolkit is in place is that a correct statement.
Again thank you folks for your assistance been a huge help!!BRL
Free Windows Admin Tool Kit Click here and download it now
November 1st, 2010 9:49am