Submit a ticketCall us

AnnouncementsFace your biggest database issues head-on

Our new eCourse helps you navigate SQL Server performance blocks by teaching you how to recognize and deal with the three DBA Disruptors: Performance Hog, Blame Shifter, and Query Blocker. Register today to learn how to defend your environment and fend off menacing disruptions.

Register for your free eCourse.

Home > Success Center > Server & Application Monitor (SAM) > SAM - Knowledgebase Articles > Maintain equals sign (=) in PowerShell script arguments (SAM)

Maintain equals sign (=) in PowerShell script arguments (SAM)

Updated July 17, 2018

Overview

This article describes how to resolve an issue that occurs when adding an equals sign (=) to a PowerShell monitoring script. When you click the Get Script Output button and run the script, the equals sign disappears along with any code after it. Only the first part of the provided argument is displayed as an output, with an additional '-' sign at the beginning.

An "equals sign" is also known as an "equality sign".

Environment

  • SAM 6.5 and later

Cause 

SAM only recognizes the first part of the script that appears before the equals sign, as shown in this example:

 

EditScriptsSlawomir.png

This issue will be fixed in a future SAM release. See below for an interim workaround. 

 

Resolution

Add a prefix so the script recognizes the two separate arguments; the first argument contains a new prefix and the second has the actual argument including the equality sign, as shown here: 

value=abc=def

Additional changes to the script may be required, as shown in this example:

 

EditScriptsSlawomirFixed.png

 

See also: 

 

Last modified

Tags

Classifications

Public