MFCOM: Connection licenses and usage count
Yet Another Citrix Administrator Task, monitor the connection licenses and usage count in the farm...
Feel like a hill billy...
Code Snippet:
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
If not fso.FolderExists("c:\liclog" ) then
Set MyFolder = fso.createFolder("c:\liclog" )
else
End if
if not fso.FileExists("c:\liclog\licCount.log" ) then
Set MyFile= fso.createTextFile("c:\liclog\licCount.log")
MyFile.writeline "Date " & " Time " & "Lic Type " & "Used"
MyFile.close
else
end if
Const ForAppending = 8
Set MyFile= fso.OpenTextFile("c:\liclog\licCount.log", ForAppending,True)
Dim theFarm, aLicense
Set theFarm = CreateObject("MetaFrameCOM.MetaFrameFarm")
' Initialize the farm object.
theFarm.Initialize(MetaFrameWinFarmObject)
For Each aLicense In theFarm.LicenseSets(MFLIcenseClassConnection)
if aLicense.LicenseID = "0000000000000003" then
MyFile.WriteLine date & "," & time & "," & aLicense.Name & "," & aLicense.pooledinuse("")
else
end if
next
MyFile.Close
If at first you fail, call it version 1.0
No comments:
Post a Comment