PowerShell script to determine whether product usage is billable under an ELS

This PowerShell script takes a Monthly Usage By User report saved as a CSV file and appends an ID column containing the four-digit product ID number, providing values that are tolerant of product name changes. It also appends an ELS Billable column, displaying whether products are billable under an ELS agreement.

A CSV input file is a required parameter. If not specified, the script will prompt for a CSV file as input.

An optional output file parameter can be specified. If omitted, a CSV file with the same name and "(with ID)" added will be created in the same directory as the original.

A filterCSS switch is provided for users with a Cloud Services Subscription. It considers visa-related products as non-billable under an ELS since such usage is covered by a Cloud Services Subscription instead.

The script requires Internet access to retrieve a current list of products from Bentley, but it maintains a backup copy of the last successful retrieval in the user's Temp folder to provide functionality in case of connectivity issues. The script also relies upon a IsVisa.txt file and assumes it is in the same directory as the script.

Last Modified: February 23, 2017
Version: 1.2.1

Usage:
AddProductID -inputFile <string> [-outputFile <string>] [-filterCSS]

Important: Expand the zip archive before executing the script. For security reasons, PowerShell script execution may be disabled by default. To temporarily allow the execution of scripts, execute the following command from a Command Prompt, and execute the PowerShell script from this window:
PowerShell.exe -ExecutionPolicy bypass

Anonymous
Related
Recommended