on-internet
← Community

Batch File output based on hostname

Stack Overflow ·

Struggling to find the answer/code needed. Currently using the following script. I'd like the text output file to be the Host name. How can i do this? @echo off REM setlocal enabledelayedexpansion ( systeminfo | findstr /c:"Host Name" systeminfo | findstr /c:"Domain" systeminfo | findstr /c:"OS Name" systeminfo | findstr /c:"OS Version" systeminfo | findstr /c:"System Manufacturer" systeminfo | findstr /c:"System Model" systeminfo | findstr /c:"System type" systeminfo | findstr /c:"Total Physical Memory" ipconfig | findstr IPv4 echo. echo Hard Drive Space: wmic diskdrive get size echo. echo. e

Comments

Sign in or sign up to comment and upvote.

No comments yet.