Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lockstep - Citrix Licensing Monitor.ps1 Errors #1

Open
xalapa5000 opened this issue Oct 30, 2015 · 5 comments
Open

Lockstep - Citrix Licensing Monitor.ps1 Errors #1

xalapa5000 opened this issue Oct 30, 2015 · 5 comments
Assignees

Comments

@xalapa5000
Copy link

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.

@sandersjds sandersjds self-assigned this Oct 30, 2015
@sandersjds
Copy link
Collaborator

I uploaded the "with lookups" version and adjusted the syntax. There was a change in the way string concatenation worked between PowerShell 2 and 3.

https://github.com/sandersjds/citrix-prtg/blob/master/Lockstep%20-%20Citrix%20Licensing%20Monitor%20-%20withlookup.ps1

@xalapa5000
Copy link
Author

Good to see. I downloaded the files initially from the blog. They were
labeled "with lookups" but they had the old code in them.

On another point, I'm not getting any errors but I'm also not getting any
percent used data. Any ideas?

On Fri, Oct 30, 2015 at 11:12 AM, Josh Sanders [email protected]
wrote:

I uploaded the "with lookups" version and adjusted the syntax. There was a
change in the way string concatenation worked between PowerShell 2 and 3.

https://github.com/sandersjds/citrix-prtg/blob/master/Lockstep%20-%20Citrix%20Licensing%20Monitor%20-%20withlookup.ps1


Reply to this email directly or view it on GitHub
#1 (comment)
.

@sandersjds
Copy link
Collaborator

Check to see if it matches what is reported in the licensing console directly. A lot of the products don't actually check out licenses - I've really only seen it with XenDesktop.

@xalapa5000
Copy link
Author

The PowerShell code verifies that the Xendesktop is the only license that
shows an InUseCount:

__GENUS : 2
__CLASS : Citrix_GT_License_Pool
__SUPERCLASS :
__DYNASTY : Citrix_GT_License_Pool
__RELPATH :
Citrix_GT_License_Pool.DUP_GROUP=8,FLOAT_OK=FALSE,HOST_BASED=0,HOSTID="",PLATFORMS="",PLD=
"XDT_ENT_CCS",
__PROPERTY_COUNT : 15
__DERIVATION : {}
__SERVER : server
__NAMESPACE : ROOT\CitrixLicensing
__PATH : \server\ROOT\CitrixLicensing:Citrix_GT_License_Pool
Count : 100
DUP_GROUP : 8
FLOAT_OK : False
HOST_BASED : 0
HOSTID :
InUseCount : 19
LicenseType : Retail
Overdraft : 0
PLATFORMS :
PLD : XDT_ENT_CCS
PLDFullName : XDT_ENT_CCS
PooledAvailable : 81
SubscriptionDate : date
USER_BASED : 0
VendorString : ;LT=Retail;
PSComputerName : server

However the PRTG console still shows 0% usage:

[image: Inline image 1]

Anything we can do from here?

On Fri, Oct 30, 2015 at 7:08 PM, Josh Sanders [email protected]
wrote:

Check to see if it matches what is reported in the licensing console
directly. A lot of the products don't actually check out licenses - I've
really only seen it with XenDesktop.


Reply to this email directly or view it on GitHub
#1 (comment)
.

@sandersjds
Copy link
Collaborator

I'll check this code in the next week or so to see if I can duplicate what you're seeing, and find the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants