🠔 Back to Script Library

Ivanti Environment Manager Logging – Enable

Enables Environment Manager logging on the selected endpoint if Environment Manager is installed. This SBA requires EM 8.6 or higher.

Version: 1.2.5
Created: 2018-03-26  |   Modified: 2018-05-03  |   Creator: Landon Winburn
Downloads: 50
Tags:
The Script Copy Script Copied to clipboard

Const HKEY_LOCAL_MACHINE = &H80000002
Set oReg=GetObject(“winmgmts:{impersonationLevel=impersonate}!\.rootdefault:StdRegProv”)

If oReg.EnumKey(HKEY_LOCAL_MACHINE, “SOFTWAREAppSenseEnvironment Manager”, “”, “”) <> 0 Then
Wscript.Echo “Environment Manager not installed.”
Wscript.Quit
End If

oReg.SetDWordValue HKEY_LOCAL_MACHINE, “SOFTWAREAppSenseEnvironment Manager”, “LockdownLogging”, 0
oReg.SetStringValue HKEY_LOCAL_MACHINE, “SOFTWAREAppSenseEnvironment Manager”, “LockdownLoggingProcesses”, “”
oReg.SetDWordValue HKEY_LOCAL_MACHINE, “SOFTWAREAppSenseEnvironment Manager”, “LockdownDebugLevel”, 0
oReg.SetDWordValue HKEY_LOCAL_MACHINE, “SOFTWAREAppSenseEnvironment Manager”, “FbrCorruptionChecking”, 0
oReg.SetDWordValue HKEY_LOCAL_MACHINE, “SOFTWAREAppSenseEnvironment Manager”, “EMLoaderDebugging”, 0
oReg.SetStringValue HKEY_LOCAL_MACHINE, “SOFTWAREAppSenseEnvironment Manager”, “DebugPath”, “”
oReg.SetDWordValue HKEY_LOCAL_MACHINE, “SOFTWAREAppSenseEnvironment Manager”, “EmLoaderDebugLevel”, 0

If oReg.EnumKey(HKEY_LOCAL_MACHINE, “SOFTWAREAppSenseEnvironment ManagerEventTracing”, “”, “”) <> 0 Then
oReg.CreateKey HKEY_LOCAL_MACHINE, “SOFTWAREAppSenseEnvironment ManagerEventTracing”
End If

oReg.SetDWordValue HKEY_LOCAL_MACHINE, “SOFTWAREAppSenseEnvironment ManagerEventTracing”, “Enabled”, 1
oReg.SetDWordValue HKEY_LOCAL_MACHINE, “SOFTWAREAppSenseEnvironment ManagerEventTracing”, “LogLevel”, 4
oReg.SetStringValue HKEY_LOCAL_MACHINE, “SOFTWAREAppSenseEnvironment ManagerEventTracing”, “LogSessionName”, “EM_ETW_Session”
oReg.SetStringValue HKEY_LOCAL_MACHINE, “SOFTWAREAppSenseEnvironment ManagerEventTracing”, “LogFileName”, “C:LogsEmTraceLog.etl”
oReg.SetDWordValue HKEY_LOCAL_MACHINE, “SOFTWAREAppSenseEnvironment ManagerEventTracing”, “LogFileSizeLimitMB”, 512
oReg.SetDWordValue HKEY_LOCAL_MACHINE, “SOFTWAREAppSenseEnvironment ManagerEventTracing”, “BufferSizeKB”, 256
oReg.SetDWordValue HKEY_LOCAL_MACHINE, “SOFTWAREAppSenseEnvironment ManagerEventTracing”, “MaxBuffers”, 64
oReg.SetDWordValue HKEY_LOCAL_MACHINE, “SOFTWAREAppSenseEnvironment ManagerEventTracing”, “MinBuffers”, 16
oReg.SetDWordValue HKEY_LOCAL_MACHINE, “SOFTWAREAppSenseEnvironment ManagerEventTracing”, “LoggingMode”, 2
arrStringValues = Array(“emcoreservice”, “emuser”, “emsystem”, “emuserlogoff”, “emloggedonuser”, “emexit”, “emauthpackage”, “winlogon_notify_package”, “winlogon_detour”, “emcredentialmanager”, “emlogoffuiapp”, “emwow64”, “emvirtualizationhost”)
oReg.SetMultiStringValue HKEY_LOCAL_MACHINE, “SOFTWAREAppSenseEnvironment ManagerEventTracing”, “Components”, arrStringValues
Wscript.Echo “Environment Manager logging enabled.”

START YOUR TRIAL

Get Your Download Link

Gain access to ControlUp from your PC. Register and get a link to start your Free Trial.