Powershell Snippet – Retrieve Citrix Endpoint Name from WFAPI

[code language=”powershell”] $code = @’ using System; using System.Runtime.InteropServices; namespace WFAPI { public enum WF_INFO_CLASS { WFVersion, // OSVERSIONINFO WFInitialProgram, WFWorkingDirectory, WFOEMId, WFSessionId, WFUserName, WFWinStationName, WFDomainName, WFConnectState, WFClientBuildNumber, WFClientName, WFClientDirectory, WFClientProductId, WFClientHardwareId, WFClientAddress, WFClientDisplay, WFClientCache, WFClientDrives, WFICABufferLength, WFLicenseEnabler, RESERVED2, WFApplicationName, WFVersionEx, WFClientInfo, WFUserInfo, WFAppInfo, WFClientLatency, WFSessionTime, WFLicensingModel } public class Program { [DllImport("wfapi.dll", CharSet=CharSet.Unicode,SetLastError=true)] public …

WordPress Appliance - Powered by TurnKey Linux