There are generally two ways of getting information about the SCCM Assigned Site. You can query the Service Locator Point (SLP) or you can get the information from Active Directory. Both need to be configured. Querying Active Directory can sometimes become
a pain as there are often several ways how something can be defined and how it can be stored in AD. The current functions try to evaluate the assigned site based on the different ways you can define the boundary in SCCM (IP Subnet, Active Directory Site, IP
Address Range, etc). Looking at the log you provided it simply can't evaluate the IP Address into an assigned site. So there might be an issue with the configured boundaries. For troubleshooting this you can use a tool like
to verify the information in AD. Just open it and connect to your local Domain. within your default domain Container you should find a container named "System" and within another Container called "System Management". Within this container
you can find more or less all the information about SCCM Active Directory is aware of. So typically you should either have an entry similar to SMS-SiteCode-IPRangeLow-IPRangeHigh and SMS-Site-SiteCode. Just check if a boundary has been configured and is visible
for the site you requested.
The fastest way to get it working is probably configuring a SLP and use the "GetAssignedSiteByIP" from the SCCM.asmx webservice. It is more or less identical to the "GetAssignedSite" from the original MDT webservice. The information in
the SCCM_Bootstrap.ini file defines How a webservice is called. This could look like
The actual call to the webservice is executed within the file ZTIMediaHook.wsf in Line 96
' Get assigned Site
oEnvironment.Item("AssignedSite") = GetAssignedSite
This is calling the Function "GetAssignedSite" further down in the script starting at line 170. You could simply replace this with the function from the original MDT Example. It looks like this (copied from MDT Source files):
' Create the web service instance
Set oService = new WebService
oService.IniFile = "SCCM_Bootstrap.ini"
oService.SectionName = "GetAssignedSite"
' Check each IP/subnet looking for an assigned site
Set oAdapters = objWMI.ExecQuery("select * from Win32_NetworkAdapterConfiguration where IPEnabled = 1")
For each oAdapter in oAdapters
If not (IsNull(oAdapter.IPAddress)) then
i = 0
For each sElement in oAdapter.IPAddress
If sElement = "0.0.0.0" or Left(sElement, 7) = "169.254" or sElement = "" then
oLogging.CreateEntry "Ignoring IP Address " & sElement, LogTypeInfo
ElseIf Instr(sElement, ":") > 0 then
oLogging.CreateEntry "Ignoring IPv6 Address " & sElement, LogTypeInfo
' Calculate the subnet number
sSubnet = ""
arrIPBytes = Split(sElement, ".")
arrSubnetBytes = Split(oAdapter.IPSubnet(i), ".")
For index = 0 to 3
sSubnet = sSubnet & CStr( CInt(arrIPBytes(index)) and CInt(arrSubnetBytes(index)) ) & "."
sSubnet = Mid(sSubnet, 1, Len(sSubnet) - 1)
' Call the web service
oEnvironment.Item("SiteIP") = sElement
oEnvironment.Item("SiteSubnet") = sSubnet
oEnvironment.Item("SiteMACAddress") = oAdapter.MacAddress
Set oXML = oService.Query
If oXML is Nothing then
oLogging.CreateEntry "Unable to query web service.", LogTypeWarning
sAssignedSite = ""
sAssignedSite = oXML.SelectSingleNode("string").Text
If sAssignedSite <> "" then
If sAssignedSite <> "" then
i = i + 1
GetAssignedSite = sAssignedSite
After these change the example BootWizard should query the SLP for this information and the rest should work as before.