Tuesday, October 7, 2014

Bat script to find out remote computer if running a 32-bit OS or a 64-bit OS.

This is a quick and easy way to verify if a remote computer is running a 32-bit OS or a 64-bit OS.
If you have trouble getting it to work, be sure you're using an admin command prompt (I've seen wmic not work from a regular command prompt)


1. Open notepad.


2. Copy and paste below and save as OSscript.bat  or whatever you want. Enjoy














:Start
cls
@echo off
Echo.
Echo Remote OS Info (Verifying 32-bit or 64-bit)
Echo.

Set /P Computer=Enter the Computer Name:
If  "%Computer%"==  "" goto BadName
pause

wmic /node:"%Computer%" os get osarchitecture
pause

Goto End

:BadName
Cls
Echo.
Echo You have entered an incorrect name or left this field blank
Echo Please enter a valid Name or press Ctr-C to exit.
Echo.
Pause
Goto Start

:End










































Credit
http://community.spiceworks.com/scripts/show/2169-remote-os-info-verifying-32-bit-or-64-bit