WMIC Remoting

WMIC Remoting

Check if  a Patch is installed against a list of servers

psexec.exe @list.txt -s "wmic" qfe list full | findstr "KB2621440"

WMIC Commands

wmic product list brief

wmic service list brief

wmic process list brief

wmic startup list brief

Run WMIC on Remote Computers


@echo off
REM wmic service where StartMode="Auto" list brief
REM wmic /node:"@serverlist.txt" /output:service.html where StartMode="Auto" list brief
REM wmic /output:%hostname%.txt service where StartMode="Auto" list brief

 
:start
for /f %%I in (serverlist.txt) do call :run %%I
goto :end
:run
echo %1
rem wmic /node:%1 service where StartMode="Auto" list brief > \\%\%1_before.txt
wmic /node:%1 /output:\\%\before\%1_before.html service where StartMode="Auto" list brief /format:htable
goto :eof
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s