User`s guide

Table Of Contents
Challenges in PowerShell Scripting for WCI
When you develop custom collection scripts, understand the challenges that you might encounter while
scripting in PowerShell to collect the Windows Custom Information (WCI)ī ±data type from VCM managed
Windows machines.
PowerShell scripts can use the split method of PowerShell strings, which separates the columns of the rows
into separate values in arrays. For example, Windows provides the schtasks.exe utility to manage
scheduled tasks on a local or remote computer and report on the scheduled tasks.
The split method of PowerShell strings in the $schtasks script separates the columns of the $schtasks
rows into separate values in arrays.
n
Column names row provides the names to use for attributes.
n
Corresponding data from the scheduled task rows provides the values to use for these attributes.
The top-level name of <schtasks> is an arbitrary name that you apply to distinguish the results of this
script from other results. The XML script returns the parsed data, which resembles the following structure.
<schtasks>
<taskname1>
<attribute1>Value1</attribute1>
<attribute2>Value2</attribute2>
</taskname1>
<taskname2>
<attribute1>Value1</attribute1>
<attribute2>Value2</attribute2>
</taskname2>
</schtasks>
The returned data can include the following content, which causes problems.
n
White space, such as tabs or spaces, is not allowed in returned data.
n
Column names include spaces.
n
Specific task entries do not include a unique and repeatable identifier.
n
Values can contain XML syntax in functions, which you must enclose in CDATA.
Getting Started with VCM
VMware, Inc. 95