Hacker News new | past | comments | ask | show | jobs | submit login

I would highly suggest checking out Powershell. It works great on windows and linux, its object oriented, and it has all sorts of "networked" capabilities built into it to. For example, say you want to get the disk space on your own computer: Get-WmiObject Win32_LogicalDisk

If you want to do that on a remote machine you just add this to the end of the command -ComputerName remotecomputer: Get-WmiObject Win32_LogicalDisk -ComputerName remotecomputer

And then you can just use the returned object to iterate over it: $disk = Get-WmiObject Win32_LogicalDisk -ComputerName remotecomputer -Filter "DeviceID='C:'" | Foreach-Object {$_.Size,$_.FreeSpace}




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: