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 fsoSet fso = CreateObject("Scripting.FileSystemObject")If not fso.FolderExists("c:\liclog" ) thenSet MyFolder = fso.createFolder("c:\liclog" )elseEnd ifif not fso.FileExists("c:\liclog\licCount.log" ) thenSet MyFile= fso.createTextFile("c:\liclog\licCount.log")MyFile.writeline "Date " & " Time " & "Lic Type " & "Used"MyFile.closeelseend ifConst ForAppending = 8Set MyFile= fso.OpenTextFile("c:\liclog\licCount.log", ForAppending,True)Dim theFarm, aLicenseSet theFarm = CreateObject("MetaFrameCOM.MetaFrameFarm")' Initialize the farm object.theFarm.Initialize(MetaFrameWinFarmObject)For Each aLicense In theFarm.LicenseSets(MFLIcenseClassConnection)if aLicense.LicenseID = "0000000000000003" thenMyFile.WriteLine date & "," & time & "," & aLicense.Name & "," & aLicense.pooledinuse("")elseend ifnext
MyFile.Close
If at first you fail, call it version 1.0
No comments:
Post a Comment