How can I determine the OS of a remote computer, given its computer name?
You can use
nmap to probe the remote computer and based on it's responses to TCP packets (valid or invalid requests)
nmap can infer what operating system it is using.
This is not 100% accurate, but probably the best you can do in the general case.
If you're limiting yourself to Windows only and you have credentials of an administrator account on the remote machine, you can use this method instead.
View system properties
To perform this procedure on a remote computer, right-click Computer Management (Local), click Connect to another computer, select Another computer, and then type in the name of the remote computer. You can then follow the steps in this procedure, starting at step 2, and substituting Computer Management (remote computername) for Computer Management (Local). You must be a member of the Administrators group, or you must have been delegated the appropriate authority, on the computer that you specify for remote computername.
And further to this, if your computers are joined to a domain then you can look at the computer accounts in Active Directory. These should tell you about the machine.
Given then information you have given, the answer is you can not determine a machine's OS by its name.
Systeminfo command shows os name and service pack number. you can run this command on the remote computer using psexec.
Using cmd (Command prompt in windows Vista, XP, etc)
systeminfo /s IP.ADDRESS /u UserOnRemotePc
systeminfo /s 172.16.23.108 /u Student
WMIC /NODE:hostname OS
*you can supply alternative credentials as well.
wmic /NODE:hostname OS > C:\OS.txt
Quick and simple, you can use the Windows Inventory interface
wmic /node: HOST_NAME os get caption
You can do this with Windows PowerShell, which is installed by default in Windows 7. You can get to it from the system menu, under Accessories.
The command that you can use is...
Get-WmiObject -Class Win32_OperatingSystem -Namespace root/cimv2 -ComputerName <ipaddr_or_hostname> | Format-List -Property *
You can run this against a local or remote system by specifying the correct value for the ComputerName property.
You can filter the output for specific info by specifying which properties to display...
Get-WmiObject -Class Win32_OperatingSystem -Namespace root/cimv2 -ComputerName <ipaddr_or_hostname> | Format-List -Property Name, OSArchitecture, SerialNumber
- Click the Windows Start button and type msinfo32 and press Enter
- Click View > Remote Computer > Remote Computer on the Network
- Type machine name and click OK
A non-comprehensive solution was to simply open the C drive of the remote computer in Windows Explorer. The presence of Documents and Settings showed it to be WinXP, as we have no Win2K.