Skip to content

Lockstep - Citrix Licensing Monitor.ps1 Errors #1

@xalapa5000

Description

@xalapa5000

I was getting the following error when running the Licensing Monitor script:

At C:\Users\username\Desktop\Licensing\Lockstep - Citrix Licensing Monitor - withlookup.ps1:86 char:19

  •         return "Error: $ComputerName: " + $_.Exception.InnerExcep ...
    
  •                        ~~~~~~~~~~~~~~
    
    Variable reference is not valid. ':' was not followed by a valid variable name character. Consider using ${} to
    delimit the name.

At C:\Users\username\Desktop\Licensing\Lockstep - Citrix Licensing Monitor - withlookup.ps1:88 char:19

  •         return "Error: $ComputerName: " + $_.Exception.Message
    
  •                        ~~~~~~~~~~~~~~
    
    Variable reference is not valid. ':' was not followed by a valid variable name character. Consider using ${} to
    delimit the name.

At C:\Users\username\Desktop\Licensing\Lockstep - Citrix Licensing Monitor - withlookup.ps1:95 char:18

  •     return "Error: $ComputerName: $ServiceName not running."
    
  •                    ~~~~~~~~~~~~~~
    
    Variable reference is not valid. ':' was not followed by a valid variable name character. Consider using ${} to
    delimit the name.
    • CategoryInfo : ParserError: (:) [], ParseException
    • FullyQualifiedErrorId : InvalidVariableReferenceWithDrive

I removed the ":" after each $computername and the script no longer errors out.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions