Thanks for the tip. Assigning the listitem to an array works great.
From: [email protected] [mailto:[email protected]] On
Behalf Of Keith Garner (Hotmail)
Sent: Tuesday, July 29, 2014 5:02 PM
To: [email protected]
Subject: RE: [MDT-OSD] OSD Variables as List
IN VBScript, just use ListItem:
<job id="Example">
<script language="VBScript" src="ZTIUtility.vbs"/>
<script language="VBScript">
dim aStrings, sItem
' Generate an Array
aStrings = array ( "Hello", "World" )
oEnvironment.ListItem("ADsecurityGroups") = aStrings
for each sitem in oEnvironment.ListItem("ADsecurityGroups")
oLogging.CreateEntry "Item " & sItem , LogTypeInfo
next
</script>
</job>
In Powershell, if you are running within the powershell MDT Host, use the
$TSEnvList item.
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Miller, Todd
Sent: Tuesday, July 29, 2014 2:34 PM
To: [email protected]<mailto:[email protected]>
Subject: [MDT-OSD] OSD Variables as List
I would like to convert an array of Strings into an MDT/OSD oEnvironment
variable list.
Let's say I have an array of strings ADSecurityGroups like ADSecurityGroup[1]
= "Group1" ADSecurityGroup[2] = "Group2" and so on
I would like to write a script that will convert the array into a list style
OSD variable
or can I just (pseudocode) ...
For I = 1 to count of objects in ADSecurityGroups
oEnvironment.Item("ADsecurityGroups00" & Sctr(i)) =
ADSecurityGroups[i]
next i
Is there something special about Lists vs. regular variables?
Maybe someone already has a VBScript written that will convert an array to a
OSD Variable list?
________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and
may be legally privileged. If you are not the intended recipient, you are
hereby notified that any retention, dissemination, distribution, or copying of
this communication is strictly prohibited. Please reply to the sender that you
have received the message in error, then delete it. Thank you.
________________________________
________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and
may be legally privileged. If you are not the intended recipient, you are
hereby notified that any retention, dissemination, distribution, or copying of
this communication is strictly prohibited. Please reply to the sender that you
have received the message in error, then delete it. Thank you.
________________________________