Installation guide

Table Of Contents
Troubleshooting Custom PowerShell Scripts
If you encounter problems when you run custom PowerShell scripts, run the script as a .ps1 file and
correct any errors before you use the script with a VCM collection filter.
Prerequisites
n
Verify that your script runs in PowerShell. See "Verify that Your Custom PowerShell Script is Valid" on
page 109.
n
Understand the PowerShell script signing policies. See "PowerShell Script Signing Policies" on page 101.
Procedure
1. On your VCM Collector, save the script to a file that has the .ps1 extension.
2. Run the script file from a command line using PowerShell 2.0 or PowerShell 1.0.
n
For PowerShell 2.0, run:
PowerShell –command set-executionpolicy RemoteSigned scope Process ;
scriptname.ps1 > resultfile.xml
n
For PowerShell 1.0, set the execution policy to Remote Signed or use a less restrictive policy, and
run:
PowerShell –file scriptname.ps1 > resultfile.xml
When the script is finished running, it generates the XML file.
3. Verify that you can open the XML file in Internet Explorer.
n
If you cannot see the entire file, allow blocked content.
n
If Internet Explorer cannot parse the XML file, you must correct any formatting errors.
If you have Visual Studio installed, you can use it locate formatting errors in large XML files.
What to do next
n
Re-run your custom PowerShell script to verify that it runs correctly. See "Collect Windows Custom
Information Data" on page 110.
n
View the detailed status about exit codes and standard error output for each job that processed the
script or filter. See "View Windows Custom Information Job Status Details" on page 112.
n
After the Windows Custom Information data is available in the VCM database, you can generate
reports and enforce compliance. See the online help.
Configuring Windows Machines
VMware, Inc.
115