How do I get log details (current logon user /machine name) on remote server in window application?
Hi ,
We have a developed a windows application using c# to start/stop/execute a service (windows service written in .Net) on a remote server.
I need to maintain log information for the current logon user who started /stopped/executed the service on the remote server.That means on the remote server we need details(current logon user who invoked the service) in the event viewer . How can I achieve this?
Basically we have 3 buttons for start,stop,execute functions and below is simplified piece of code and need to maintan user log information(machine name/current logon user) on remote server Event viewer.
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
Refer to below posts
Quick-Hits: Find currently logged on users
http://learn-powershell.net/2010/11/01/quick-hit-find-currently-logged-on-users/
PowerShell Script To Retrieve the Logged On User For A Remote Machine
http://www.myitforum.com/articles/1/view.asp?id=11217
PowerShell script to find status of service on a remote computer
http://www.pixelchef.net/powershell-script-find-status-service-remote-computer
http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/c3459e6c-1e5e-409f-b654-76014a456d04/
http://apprepack.blogspot.in/2012/07/get-status-of-service-on-remote-machine.html
http://learn-powershell.net/2012/01/15/startingstopping-and-restarting-remote-services-with-powershell/