User`s guide

Table Of Contents
the task name is used as the element name for task rows, but the “increment” option is selected for
duplicate handling when creating a collection filter based on this script. This action allows the collection
process to add an incremental entry to a list of multiple entries with the same task name: the first example
of GoogleUpdateTaskMachineCore, while the second example will be relabeled as
GoogleUpdateTaskMachineCore_1.
It is still possible that reordering the list among tasks that have the same name, will cause “extra” changes
to be reported, but regardless of these changes, it is reasonable to have VCMdisplay the friendly task
names in the user interface. Because task names also can contain characters that would not be valid for
XML element names, the task names, as with the column names, are encoded using the
ToCMBase64String function.
Troubleshooting Custom PowerShell Filter Scripts
You can interactively test a custom PowerShell script using the following procedures.
Procedure
Verify the script runs correctly within a PowerShell shell.
1. Start PowerShell from the command line on a VCM-managed machine.
2. Paste the inspection script into the PowerShell shell window.
3. Depending on the last character, it may require one extra hit of the Enter key to start the script
4. The script should run to completion without throwing any errors (red text in the command line based
powershell.exe environment).
5. Once completed, the script should return a set of XML, without any formatting white space (no CR LF
at the end of elements, nodes, or attributes).
6. When this test is successful, run the script from a file.
Procedure
After you have verified the script runs correctly within PowerShell, run the script from a file:
1. Save the script to a .ps1 file.
2. From a command line run the script directly:
n
For PowerShell 2.0, execute: PowerShell –command set-executionpolicy RemoteSigned
scope Process ; scriptname.ps1 > resultfile.xml
n
For PowerShell 1.0 (with the execution policy already set to Remote Signed or less restrictive),
execute: PowerShell file scriptname.ps1 > resultfile.xml
When the script is complete, the XML result file should be created.
3. Verify that the XML file in question can be opened in Internet Explorer (you may have to allow
blocked content in order to see the entire file). If the XML file cannot be parsed by Internet Explorer,
the formatting errors in the XML from the script will need to be corrected before the script can be used
as a collection filter script. Visual Studio can be a useful tool for finding formatting errors in larger XML
files.
For details the job status reporting for WCI, see Getting Started Collecting Windows Custom Information.
vCenter Configuration Manager Installation and Getting Started Guide
96 VMware, Inc.