Hi,
I have been going crazy over the past two weeks trying to figure this out. We have various servers running windows server 2008 on our network and people are constantly using remote desktop from windows 7 to log onto these servers. My goal is to get the hostname currently logged into the servers over rdp from the webserver. (all of these servers/computers/webserver are on the same domain). This info is available using netstat called on the server that the hostname is logged into.
I have tried many methods, but the only that has worked out at all is using php to call shell_Exec to call "psexec \\server netstat -o". However, psexec hangs upon retrieving the output (this appears to be a known bug with calling psexec from a scripting language). I have also tried using WMI to get the active TCP/IP connections, but there doesn't seem to be a way to get the hostname/IP logged into the server using WMI (the localAddress column from netstat). Does anyone have any suggestions as to how I can get this done?
Thanks!
Get Netstat output from remote machine invoked by webserver
Moderator: DosItHelp
-
- Posts: 1
- Joined: 14 Jan 2012 09:49
-
- Posts: 22
- Joined: 20 Nov 2012 12:42
Re: Get Netstat output from remote machine invoked by webser
jdimmerman wrote:We have various servers running windows server 2008 on our network and people are constantly using remote desktop from windows 7 to log onto these servers.
You make it sound like they are not suppose to be doing this. If so then disallow it.
Re: Get Netstat output from remote machine invoked by webser
The OP was a post from January.