Hi Everyone,
I am not very god at scripting and need a bit of your help.
I have a command hat I plan on using to get a remote computesr's OS version and installed patches.
I can use a txt file with the computer name to be queried, but I thought it would be even easier for the batch file to ask me for input so I enter the computer name and once I enter it, it uses it for the next command.
Here is the code I have so far:
@echo off
set /p CompName= Enter name of computer? %Compname% > c:\computers.txt
wmic /node:@c:\computers.txt os get Caption,CSDVersion /value /format:htable >> C:\OSnPatches.htm & wmic /node:@c:\computers.txt qfe list full /format:htable >> C:\OSnPatches.htm
Can you help me get the CompName variable be used in the WMIC query?
Thanks in advance,
S