Quantcast
Channel: Ivanti User Community : All Content - OS Deployment and Provisioning
Viewing all articles
Browse latest Browse all 1803

MBSDK - create / start a provisioning task in WinPE

$
0
0

I'm still very new to Landesk. I'm trying to set up a menu that allows you to choose between various templates while in WinPE.

 

So basically I want to have one basic template with nothing in it but the start menu. This calls then the the actual installation template with the OS. We need this config because we have different base images for Europe/ US and Asia due to language issues.

 

I found  the way how to create tasks through MBSDK.

 

Now I'm a bit stuck, as I get the task creation going if I start my script in Windows. But when I start the script in WinPE, the task is still created, but no computer name is not communicated, This means that the task has nothing in it and fails.

 

Do you know a way to communicate the computername so that I can lance a PROVISIONING task in WinPE.

 

Here is the snippet that I use :

 

Sub Template_1

 

Set objWMIService = GetObject( "winmgmts:\\.\root\cimv2" )

Set colItems = objWMIService.ExecQuery( "Select * from Win32_ComputerSystem" )

For Each objItem in colItems

    strComputerName = objItem.Name

Next

 

SoapRequest = "<?xml version='1.0' encoding='utf-8'?>" & VbCrLf &_

         "<soap12:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap12=""http://www.w3.org/2003/05/soap-envelope"">" & VbCrLf &_

         "  <soap12:Body>" & VbCrLf &_

         "    <ScheduleProvisioningEx xmlns=""http://landesk.com/MBSDKService/MBSDK/"">" & VbCrLf &_

         "      <TaskName>HTA test</TaskName>" & VbCrLf &_

         "      <templateID>101</templateID>" & VbCrLf &_

         "      <StartTime>Start Now</StartTime>" & VbCrLf &_

         "      <Targets>""Computer"".""Display Name"" = """ & strComputername & """</Targets>" & VbCrLf &_

         "      <reserved></reserved>" & VbCrLf &_

         "      <deliveryMethod>Standard policy-supported push distribution</deliveryMethod>" & VbCrLf &_

         "    </ScheduleProvisioningEx>" & VbCrLf &_

         "  </soap12:Body>" & VbCrLf &_

         "</soap12:Envelope>"

Set oHttp = CreateObject("Msxml2.XMLHTTP")

oHttp.open "POST", "HTTP://landeskcore.waters.com/MBSDKService/MsgSDK.asmx", false, "DOMAIN\USER","PASSWORD"

oHttp.setRequestHeader "Host" , "landeskcore.waters.com"

oHttp.setRequestHeader "Content-Type", "application/soap+xml; charset=utf-8; action=""http://landeskcore.waters.com/MBSDKService/MBSDK/ScheduleProvisioningEx"""

oHttp.setRequestHeader "Content-Length", Len(SoapRequest)

oHttp.send SoapRequest

strResult = oHttp.responseText

 

MsgBox strResult

 

End Sub

 

I hope someone has some experience with this....

 

Best regards, Michael


Viewing all articles
Browse latest Browse all 1803

Trending Articles