Quantcast
Channel: Ivanti User Community : Document List - OS Deployment and Provisioning
Viewing all articles
Browse latest Browse all 639

How To: Collect some Registry Key data in WinPE to be reported on the inventory and use for if Conditions

$
0
0

How To:

 

In this scenario, we have several NEW machines including different models to be provisioned and we need to deploy a different image according to the model. This scenario will show us how to collect the model of the computer in the registry within WinPE environment which will be reported back to the Core Server in the temporary inventory of this machine.

We will then use this value in the inventory to create some conditions in the provisioning template to deploy 1 image or another based on this value.

 

Step by Step:

 

     Step 1: Create a batch file with the following code

FOR /F "tokens=3*" %%a IN ('reg query "HKLM\HARDWARE\DESCRIPTION\SYstem\BIOS"  /V SystemProductName  2^>nul') do miniscan.exe /send="Custom Data - Model = %%a %%b"

 

     NOTE: This code is designed to collect the device model name from a registry key, and then use miniscan.exe available in WinPE to report a custom data back to the Core Server to be available on the inventory of the device being provisioned.

 

     Step 2: Save this batch file onto a share folder

 

     NOTE: I called it "\\<CORESERVER>\TEST_SOFTWARE\SystemProductName.bat"

 

     Step 3: Go on your provisioning template and go in "OS Installation section"

 

          a. Add a first action "Download Preferred Server" to download the batch file created in Step 1 into WinPE.

 

               NOTE: Do not forget to specify the Read credentials for the corresponding Preferred server (In my example, I defined a preferred server called "10.1.1.210")

          Screen Shot 2018-01-05 at 14.24.54.png

 

          b. Add a second action "Execute File" to execute the batch file

          Screen Shot 2018-01-05 at 14.30.31.png

 

          c. Now the value appears in the inventory of the new device:

 

          Screen Shot 2018-01-05 at 14.37.40.png

 

          d. We can use an "if conditional" action to deploy one or another image depending on this inventory data:

 

          NOTE: see How to use Conditionals in LANDESK 2016 Provisioning to know how to use the conditionals (In this article, it actually explains how to deploy an image based on an inventory value, but for a computer which was already existing on the Core Server, hence the inventory data were already there).

 

          Screen Shot 2018-01-05 at 14.44.34.png


Viewing all articles
Browse latest Browse all 639

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>