Jump to content


SCCM 2012, MDT UDI Wizard - how to validate computer name against web service?

Recommended Posts



I've created a UDI Task sequence with MDT 2012 and SCCM 2012,


everything works fine, except i want to validate the computer name the will be inputed in once of the forms against the AD web service.


expect i don't undestand how to do so, i've install the web service and it works fine, but i don't understand what i need to edit in order to have this validation in one of the pages


in UDI wizard.



help would be much appreciated, as i want to use this web service for other things as well in my UDI.


Thank you in advance.

Share this post

Link to post
Share on other sites

sounds like you'd have to edit a custom page to call a webservice if thats what you want to do,

which version of MDT are you using and what web services are you using ?

Share this post

Link to post
Share on other sites

I'm using MDT 2012 Update 1 (created a page using the CreateYourOwnPage option in the UDI Wizard) and i'm using the following Web service: kKoster.Deployment.Webservice_v7_3


I'm using the following script to check against the web service (which works):



On Error Resume Next

iRetVal = ZTIProcess

ProcessResults iRetVal

On Error Goto 0



'// Function: ZTIProcess()


'// Input: None


'// Return: Success - 0

'// Failure - non-zero


'// Purpose: Perform main ZTI processing



Function ZTIProcess()

Dim oService, oXML, strMyServer, sResult

iRetVal = Success

oLogging.CreateEntry "DOES COMPUTER EXIST: Processing Does Computer Exist in AD routine", LogTypeInfo


' Create the web service instance

Set oService = New WebService

oService.iniFile = "customsettings.ini"

oService.SectionName = "DoesComputerExist"


strMyServer = oEnvironment.item("myServerName")


' Make the web service call

Set oXML = oService.Query

If oXML Is Nothing Then

oLogging.CreateEntry "Unable to call DoesComputerExist web service.", LogTypeWarning

MsgBox "Could not verify computer name against AD! Please contact your Administrator."

sResult = 0


oXML.setProperty "SelectionNamespaces", "xmlns:mk='http://maikkoster.com/Deployment'"

If UCase(oXML.SelectSingleNode("mk:boolean").Text) = "TRUE" Then

oLogging.CreateEntry "Computer exists in Active Directory!", LogTypeInfo

MsgBox "Computer account already exists!! Please use the back arrow to return to the previous screen and make the necessary changes."

sResult = True

iRetVal = Success


oLogging.CreateEntry "Computer does NOT exist in Active Directory!", LogTypeInfo

sResult = False

End If

End If

oEnvironment.item("strServerExists") = sResult


ZTIProcess = iRetVal

End Function



<!--b error="false" debug="false"-->


and also the following CustomSettings.ini settings:








what i don't understand, is how to run the script in the backround after the user input the computer name in the field so it will give error or message if the computer account is not

present in the AD.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...