Link to home
Start Free TrialLog in
Avatar of lo ahmed
lo ahmed

asked on

user input to run wmic commands on remote machine

How can i input the name of a computer and run wmic commands based on the name of the machine?
My script so far

@echo off
setlocal EnableDelayedExpansion


set /P "compname= Please enter machine name:"


wmic computersystem get name 

wmic Cpu get Name

wmic path win32_VideoController get name 

wmic ComputerSystem get TotalPhysicalMemory

WMIC LOGICALDISK where drivetype=3 get caption,size,FreeSpace

pause

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of lo ahmed
lo ahmed

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial