laxi 0 Posted September 3, 2012 Report post Posted September 3, 2012 Hi, 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. Quote Share this post Link to post Share on other sites
laxi 0 Posted September 4, 2012 Report post Posted September 4, 2012 Anyone? i only want to understand how i can put my function script inside, and make it run in one of the UDI pages... Quote Share this post Link to post Share on other sites
anyweb 478 Posted September 4, 2012 Report post Posted September 4, 2012 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 ? Quote Share this post Link to post Share on other sites
laxi 0 Posted September 4, 2012 Report post Posted September 4, 2012 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 Else 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 Else oLogging.CreateEntry "Computer does NOT exist in Active Directory!", LogTypeInfo sResult = False End If End If oEnvironment.item("strServerExists") = sResult ZTIProcess = iRetVal End Function </script> </job> <!--b error="false" debug="false"--> and also the following CustomSettings.ini settings: [DoesComputerExist] WebService=http://sms2012cen1/Webservice/AD.asmx/DoesComputerExist Parameters=myServerName myServerName=ComputerName 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. Quote Share this post Link to post Share on other sites