I am trying to make a tool that would login to multiple remote windows servers and get their drive details and display them under one window.
Possible command that I am looking forward to execute in the remote server is wmic logicaldisk get size,freespace,caption
. I intend to get the output of this command and display it.
I have remote server hostname and IP, username and password.
How do I connect to these remote servers and execute the command?
You should be able to issue remote commends with PowerShell but you have to enable PowerShell Remoting. Here is a tutorial that looks ok.
So, powershell is not enabled it means you need to use batch file. I would suggest you to try this script. I have found this script and it is working fine.
I hope this help you.