If the task is prescheduled it shouldn't need credentials. It will just pick up and run. Are you using OSD to deploy the OS and then want to use provisioning after? Is there a reason you aren't running a full end to end provisioning template for this?
I'm not sure exactly what you're trying to accomplish. Also, will you be going to 9.5 any time soon. You're a few versions behind, even after getting to 9.0 SP3.
1 of 1 people found this helpful
There is a way to do what you are asking. You would have to script the commands using SOAP calls. If you don't have prior knowledge of SOAP or MBSDK then doing some research will help. We currently do this same exact thing after we image a machine via OSD.
Mach6, we are using OSD to deploy the OS and then using Provisioning to install our 'standard apps'. We want to move to 9.5 in time but didn't want to spend time creating/testing a full end-to-end Provisioning template, which will also have a training impact.
LANDeskWizrd, we will look into this, thanks for the heads-up.
Thanks Frank. I don't have any experience with SOAP or MBSDK and trying to find how to do this is proving difficult. Do you have any code you can share with us to help please?
Sure, Here is a template for a vbscript i use for 'self-service imaging through the Software Portal, but you can change this easily to start in PE for example. You start it by running this vbs with the Template ID as command line parameter, in the script is the link to get the Template ID's. Also, read through the script and Replace the necesarry variables with your own values. In the script is a refence to a user/password. Create a user with minimal rights of course, even better a local user on the Core, with just Provisioning rights.
The starttime can be in the past, or you can use Start Now, to start the scheduled task immediately.
set WSHShell = wscript.createObject("wscript.shell")
if WScript.Arguments.Count > 0 then
For i = 0 to (WScript.Arguments.Count-1)
StrTemplateID = WScript.Arguments(i)
StrTemplateID = InputBox("No Provisioning Template ID provided as commandline argument. Goto http://YOURSERVER/MBSDKService/MsgSDK.asmx/GetProvisioningTemplates for a list of valid TemplateID's ")
if StrTemplateID = "" then
StrServer = InputBox("No Provisioning Template ID provided as commandline argument.")
Set objNTInfo = CreateObject("WinNTSystemInfo")
GetComputerName = lcase(objNTInfo.ComputerName)
StrComputerName = objNTInfo.ComputerName
SoapRequest = "<?xml version='1.0' encoding='utf-8'?>" & VbCrLf &_
" <soap12:Body>" & VbCrLf &_
" <ScheduleProvisioningEx xmlns=""http://landesk.com/MBSDKService/MBSDK/"">" & VbCrLf &_
" <TaskName>User_Started_Provisioning</TaskName>" & VbCrLf &_
" <templateID>" & StrTemplateID & "</templateID>" & VbCrLf &_
" <StartTime>17/12/2012 4:10:00 PM</StartTime>" & VbCrLf &_
" <Targets>""Computer"".""Display Name"" = """ & StrComputername & """</Targets>" & VbCrLf &_
" <reserved></reserved>" & VbCrLf &_
" <deliveryMethod>_Provisioning Delivery</deliveryMethod>" & VbCrLf &_
" </ScheduleProvisioningEx>" & VbCrLf &_
" </soap12:Body>" & VbCrLf &_
intButton = WshShell.Popup ("Your Computer will be freshly installed. Are you sure to continue?", 0,"LANDesk Imaging", 1 + 64)
select case intButton
Set oHttp = CreateObject("Msxml2.XMLHTTP")
oHttp.open "POST", "HTTP://YOURSERVER/MBSDKService/MsgSDK.asmx", false, "DOMAIN\ACCOUNT","PASSWORD"
oHttp.setRequestHeader "Host" , "YOURSERVER"
oHttp.setRequestHeader "Content-Type", "application/soap+xml; charset=utf-8; action=""http://YOURSERVER/MBSDKService/MBSDK/ScheduleProvisioningEx"""
oHttp.setRequestHeader "Content-Length", Len(SoapRequest)
strResult = oHttp.responseText
Hmmm... It seems like copy pasting the code made all & to be &amp... Before using the script, please replace all &amp by &
Actually on vacation now, so please forgive me for not going through the whole script to change it ;)
Many thanks Frank. We will adapt your script and test in our environment. Appreciate your efforts. Happy holiday!
I'm very new to Landesk. I'm trying to set up a menu that allows you to choose between various templates while in WinPE.
I found your script very helpful, this showed me 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 the computer name is not communicated, This means that the task has nothing in it and fails.
Do you know a way to communicate the name so that I can lance a PROVISIONING task in WinPE.
<Somehow this thread got bumped, and I've seen it...>
First up - here's something around the MBSDK that may help you - Getting Started with the MBSDK (Example Scripts Included)
Next, in regard to "identifying the host name" - the way to do it would be to run a (BNF) query against the MBSDK - using the device's MAC-address (I give an example on how to run a query in the article). Essentially you want to be able to answer the question:
"Here's my MAC. What hostname / computer_idn / device_ID has this MAC address?" ... so you can then use that to add the relevant device (I usually prefer device ID, personally) against your provisioning task if need be & start it.
Does that help (assuming this is still a question / concern)?