Hello there,
The script below will generate an ETL trace; in this example, data for the Provider - Microsoft-Windows-TerminalServices-RemoteConnectionManager.
Copy
@echo off
ECHO These commands will enable tracing:
@echo on
logman create trace admin_wmi -ow -o c:\admin_wmi.etl -p " Microsoft-Windows-TerminalServices-RemoteConnectionManager " 0xffffffffffffffff 0xff -nb 16 16 -bs 1024 -mode 0x2 -max 2048
logman start admin_wmi
@echo off
echo
ECHO Reproduce your issue and enter any key to stop tracing
@echo on
pause
logman stop admin_wmi
logman delete admin_wmi
@echo off
echo Tracing has been captured and saved successfully at c:\admin_wmi.etl
Save the above mentioned script as a batch file (.bat) and run it with elevated privilege to generate the.etl file.
https://gist.github.com/guitarrapc/35a94b908bad677a7310
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer--