C# EventLogSession Local Admin

matitdob

New member
Joined
Apr 8, 2021
Messages
1
Programming Experience
Beginner
I have a problem how to use the code below for the admin of the local remote computer. Typing ".", "" Or "computer name" as domain doesn't help. The omission results in a syntax error.

C#:
EventLogSession session = new EventLogSession(
"ComputerName",            // Remote Computer
"Domain",            //Domain
"Admin",               // Username
pw,
SessionAuthentication.Default);
 
null is default value, if server is null it will use "localhost".
 
Back
Top Bottom