I am looking for a way to retrieve information similar to the following console applications remotely:
- net use
- net share
- netstat -ano
However, I need to be able to do this without starting a third-party application on the system. This effectively eliminates the use of psexec to execute the command remotely because psexec will be installed as a service.
I must add that I have administrator credentials on the remote system. I considered using WMI for remote execution, but this requires that I write the output to a file and then extract it. It is possible, but I would like to know if anyone has a better way.
I am using Delphi 2010.
source
share