none
PowerShell Cannot bind argument to parameter 'SNOWIncidentIDs' because it is an empty string RRS feed

  • Question

  • Hi All.

    I am trying to monitor certain production URLs based on which certain jobs are triggered. I was trying to work on a script that monitors the URLs, create tickets in ServiceNow & send out an email for the URLs that have failed along with the IncidentIDs created along with a HTML Table of the URLs that failed along with the Response Times and Error Status

    I have a function that Creates ServiceNow Tickets (Creates Tickets in ServiceNow), and Sending mails. If the Split Function Parameters are hardcoded as below the whole thing works without issues.

    Incident IDs: - INC0010278~INC0010279
    System IDs: - 128dcc5bdb2f8300479a7e7dbf9619d8~a09d009bdb2f8300479a7e7dbf96192f

    SplitTicketData Code: - https://pastebin.com/embed_js/CiFzSg3d

    Error: -
    SplitTicketData : Cannot bind argument to parameter 'SNOWIncidentIDs' because it is an empty string.
    At D:\01_PowerShell\WebMonitoring\14Jan2017 - URLMonitoringServiceNow WIP.ps1:340 char:34
    + SplitTicketData -SNOWIncidentIDs $IncidentIDSplit `
    +                                  ~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (:) [SplitTicketData], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,SplitTicketData
    • Moved by Bill_Stewart Monday, March 12, 2018 8:08 PM This is not "fix/debug/rewrite my script for me" forum
    Sunday, January 14, 2018 6:05 AM

All replies

  • The code posted does not match the error.

    AtD:\01_PowerShell\WebMonitoring\14Jan2017 - URLMonitoringServiceNowWIP.ps1:340char:34

    Code does not have that line.  Code has only 122 lines.


    \_(ツ)_/

    Sunday, January 14, 2018 6:30 AM