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

Conditional IF statement in Provisioning Action

$
0
0

I have been successfully using the Join Domain action and also public and template variables in my provisioning templates.  Now I am looking to take this one step further.  The easy way out would be to duplicate the template and use one for Desktops and one for Laptops but...

 

If the item is a Laptop it goes into our Laptop OU.  If the item is a Desktop it goes into our Desktop OU.

 

I tried fiddling with Replace Text action but it's too dirty for me and I don't trust it.  I am open for any suggestions and thank you in advance.

 

  • I can set a public variable called %HasBattery% which is set to return a Database value - "Computer"."System"."Has Battery"
  • This returns a simple Yes or No.

 

 

I am looking for the best course of action to achieve the following:

 

If %HasBattery% = Yes then

<ou>MyDomain/MyCorrectOU/ForLaptops</ou>

If%HasBattery% = No then

<ou>MyDomain/MyCorrectOU/ForDesktops</ou>

Else

<ou>MyDomain/MyCorrectOU/AllWorkstations</ou>

End If

 

Does anyone have any suggestions?  I am even wiling to go the VBScript route but I have a mind block on this one.  Thanks!!


Viewing all articles
Browse latest Browse all 1803

Trending Articles



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