Jump to content


conorofarrell

Established Members
  • Posts

    55
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by conorofarrell

  1. I guess your previous issue was down to the last 2 lines where it sets the variables. I've just not done it since SMS 2003, so I'm not sure what I might be missing. If could be just this at the top of the script. Dim oTaskSequence, strDomain, strGWAddress I'm not a VBS guru, I've just been stealing excerpts form other scripts over the years.
  2. Scratch that, this one should do it. Again, double check the last bit for adding the TS variable. strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colAdapters = objWMIService.ExecQuery _ ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled=True") For Each objAdapter in colAdapters For Each strGWAddress in objAdapter.DefaultIPGateway MsgBox strGWAddress Next Next Select Case strGWAddress Case "192.168.40.1" strDomain = "DomainA" Case "192.168.50.1" strDomain = "DomainB" End Select Set oTaskSequence = CreateObject ("Microsoft.SMS.TSEnvironment") oTaskSequence("OSDJOINDOMAINNAME")= strDomain
  3. If you want t use a VB Script, you can just pull the first 3 octects out of the IP. The assigne the domain to the Task Sequence Variable for the domain. I believe this to be OSDJOINDOMAINNAME, but someone may correct me on that - you can always have the %OSDJOINDOMAINNAME% set in the unattend.xml to ensure it will assign correctly. You may be able to do the same with the gateway, but I'm not sure of the WMI object to look for. I have done it this way before: strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") 'pulls IP address and trims the first 3 octets Set colAdapters = objWMIService.ExecQuery _ ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled=True") For Each objAdapter in colAdapters For Each strAddress in objAdapter.IPAddress arrOctets = Split(strAddress, ".") If arrOctets(0) <> "" Then strSubnet = arrOctets(0) & "." & arrOctets(1) & "." & arrOctets(2) x = 1 Exit For End If If x = 1 Then Exit For End If Next Next 'Displays first 3 octects - you can remove this line MsgBox strSubnet Select Case strSubnet Case "192.168.40" strDomain = "DomainA" Case "192.168.50" strDomain = "DomainB" End Select 'sets the Task Sequence Variable for the domain Set oTaskSequence = CreateObject ("Microsoft.SMS.TSEnvironment") oTaskSequence("OSDJOINDOMAINNAME")= strSubnet
  4. Hi I'm using the Dell Server Depolyment Pack (2.0) to build an image for my servers. Ihave installed it OK, and I can create the TS, but I cannot crete it if I select the options for RAID wizard or DRAC config. When I click on "create", I get he message: Error: Failed to import the XML into the task sequence. if I select other items, then the TS willc reate, but the items are not included. If I deselect them, then I can create the task sequence, but it's missing all the nice Dell tweaks. Has anyone used this tool and can shed some light on it? Any help would be apprecitated. Thanks Con
  5. I had the same problems when doing this. I found that you had to add an unattend.xml file to the OS section of the task sequence. In the XML, make sure you have the following lines: <SystemLocale>%OSDSystemLocale%</SystemLocale> <UserLocale>%OSDUserLocale%/UserLocale> <UILanguage>%OSDUILanguage%</UILanguage> <UILanguageFallback>%OSDUILanguageFallback%</UILanguageFallback> If I recall correctlyI <InputLocale>%OSDInputLocale%</InputLocale> If I recall correctly, the InputLocale uses the older WinXP type values. e.g. 0409:00000409 for English. I hope this helps. Con
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.