Taggs Posted February 24, 2006 Posted February 24, 2006 (edited) Can anybody tell me a command or way of identifying which version of the OS is on the server I remotely connect to?I tried dos VER and Help > About from a window and this only tells me that it is Windows 2000, build number and service pack.The information I am trying to collect is, is the server a Windows 2000 Std, Windows 2000 Adv, Etc...If I click the start button on the server it comes up with the Windows version on the start bar but not if I’m remotely connected and I don’t wont to have to go around several sites collecting data for over 100 servers.ThanksTaggsDon't worry, I've sorted now.Thanks Edited February 24, 2006 by Taggs
jaclaz Posted February 24, 2006 Posted February 24, 2006 You mean something like nmap:http://www.insecure.org/nmap/http://www.insecure.org/nmap/nmap-fingerpr...ng-article.htmljaclaz
cluberti Posted February 24, 2006 Posted February 24, 2006 (edited) You can do this with some WMI magic in a vb script:Option ExplicitDim objWMI, objItem, colItemsDim strComputer, VerOS, VerBig, Ver9x, Version9x, OS, OSystemstrComputer = "COMPUTERNAMEHERE"Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")Set colItems = objWMI.ExecQuery("Select * from Win32_OperatingSystem",,48)For Each objItem in colItemsVerBig = Left(objItem.Version,3)NextSelect Case VerBigCase "5.0" OSystem = "W2K"Case "5.1" OSystem = "XP"Case "5.2" OSystem = "Windows 2003"Case "4.0" OSystem = "NT 4.0"Case Else OSystem = "Unknown (Win9x perhaps?)"End SelectWscript.Echo "Version No : " & VerBig & vbCr _& "OS System : " & OSystemWScript.Quit Edited February 24, 2006 by cluberti
Lus Posted February 24, 2006 Posted February 24, 2006 u can use WMIX too.http://www.pjtec.com/Downloads/
jftuga Posted February 24, 2006 Posted February 24, 2006 Psinfo will tell you OS version and if it is standard or advanced server version. I just tried it (remotely) on Win 2K Standard & Advanced servers and on 2003 servers. If differentiated all of them with no problems,http://www.sysinternals.com/Utilities/PsInfo.html-John
Hamins Posted February 25, 2006 Posted February 25, 2006 The easiet way would be to to try MSINFO32 /computer ComputerName
GliX Posted April 5, 2006 Posted April 5, 2006 Hi I was searching for the same thing some time ago. The one I use is a simple batch job “se below”Hi I was searching for the same thing some time ago. The one I use is a simple batch job “se below”::@echo offclsecho.::ver | find "Windows XP" >nulif not errorlevel 1 goto XP::ver | find "Windows 2000" >nulif not errorlevel 1 goto 2K::ver | find "Windows NT" >nulif not errorlevel 1 goto NT::ver | find "Windows ME" >nulif not errorlevel 1 goto ME::ver | find "Windows 98" >nulif not errorlevel 1 goto 98::ver | find "Windows 95" >nulif not errorlevel 1 goto 95::ver | find "OEM Service Release" >nulif not errorlevel 1 goto OEM::ver | find "MS-DOS" >nulif not errorlevel 1 goto DOS::echo OS version not found...goto end:XPecho OS is Windows XP ...goto end:2Kecho OS is Windows 2K ...goto end:NTecho OS is Windows NT ...goto end:MEecho OS is Windows ME ...goto end:98echo OS is Windows 98 ...goto end:95echo OS is Windows 95 ...goto end:OEMecho OS is Windows OSR ...goto end:DOSecho OS is MS-DOS mode ...:endecho.::pauseCreating_a_OS_batch_file.txt
Daemonforce Posted April 5, 2006 Posted April 5, 2006 I just boot PHLAK and run nmap. It's as simple as that.
nmX.Memnoch Posted April 5, 2006 Posted April 5, 2006 The easiet way would be to to try MSINFO32 /computer ComputerNameMSINFO32 doesn't exist on Windows XP or Windows Server 2003. The replacement command is systeminfo.systeminfo /s remote_computer
GliX Posted April 7, 2006 Posted April 7, 2006 Hi aginIf it’s for a logon script I would use the Batch Job, it doesn’t involve any extended features nor programs.. and it works. Try it just copy and paste, run it and you’ll see..It’s simple especially if you have different machines on your network.I’ve used the script above for antivirus updates, and patching……
Mr Snrub Posted April 8, 2006 Posted April 8, 2006 MSINFO32 doesn't exist on Windows XP or Windows Server 2003. The replacement command is systeminfo.systeminfo /s remote_computerMSINFO32 is present on XP, XP x64 and 2003 and can be called directly from Start / Run.It does not, by default, work from a command prompt as it resides in "%programfiles%\Common Files\Microsoft Shared\MSInfo".The MPS reporting tools used at Microsoft call MSInfo32.exe when gathering system information on any version of Windows.If the machines are in a domain then doesn't the computer object store the OS version reported when the computer last booted up?
GliX Posted April 10, 2006 Posted April 10, 2006 Hi aginIt’s okay if you'r running XP on you’r LAN or local net. but what if you also have X numbers of Win2000 machines and other types of systems.I’m not saying that my version is the smartest one, but the smart solution would be to run a non OS. Spec. utility in you’r logonscript. And a Batch job "old but still running" are non OS. spec.
Mordac85 Posted April 10, 2006 Posted April 10, 2006 If you're running the script on the local system you can use the Kix macros @ProductType and @ProductSuite to get detailed info from Win9x to Vista. Or a WMI query, as mentioned above, in your favorite language to pull the OS name. But I believe systeminfo run against a remote PC will pull from the same WMI namespace.
jaclaz Posted April 11, 2006 Posted April 11, 2006 Hi I was searching for the same thing some time ago. The one I use is a simple batch job “se belowSorry, but I don't see the actual advantage of your batch file as compared to simply runverjaclaz
Mordac85 Posted April 11, 2006 Posted April 11, 2006 (edited) The difference is the amount of information. Unless you know all of the major/minor versions by heart, or want to parse it out, using a script gives much more info. I guess it really depends on how detailed he needs as to what the best/easiest option will be. From his question, I was assuming he was looking for a method to obtain a more detailed result.I tried dos VER and Help > About from a window and this only tells me that it is Windows 2000, build number and service pack.The information I am trying to collect is, is the server a Windows 2000 Std, Windows 2000 Adv, Etc...@Taggs - Do you have an idea of how you want to proceed? If you could tell us what script language you're comfortable with we might be able to toss out a quick code snippet, if you haven't already done so. Edited April 11, 2006 by Mordac85
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now