@echo off
SET dFormat=_%date:~-4,4%%date:~-10,2%%date:~-7,2%
SET sCMDparams=product get InstallDate, Name, Version /format:csv
ECHO %dFormat%
ECHO .
FOR %%f in (Server1,Server2,Server3,Server4,...) DO (
ECHO Processing %%f
ECHO Output file %%f_%dFormat%.csv
wmic /NODE:"%%f" /output:"%%f_%dFormat%.csv" %sCMDparams%
)
ECHO .
ECHO Remember to delete the first blank line
ECHO .
ECHO .
ECHO Finished.
REM ^G = Beep
ECHO •
@echo off
SET dFormat=_%date:~-4,4%%date:~-10,2%%date:~-7,2%
SET sCMDparams=qfe get /format:csv
ECHO %dFormat%
ECHO .
FOR %%f in (Server1,Server2,Server3,Server4,...) DO (
ECHO Processing %%f
ECHO Output file %%f_%dFormat%_HF.csv
wmic /NODE:"%%f" /output:"%%f_%dFormat%_HF.csv" %sCMDparams%
)
ECHO .
ECHO Remember to delete the first blank line
ECHO .
ECHO .
ECHO Finished.
REM ^G = Beep
ECHO •
C:\Windows\explorer.exe shell:::{d450a8a1-9568-45c7-9c0e-b4f9fb4537bd}
"wmic qfe" or start Powershell and type "Get-HotFix"
REM This is how would stop the Windows Update Service from installing pending updates.
REM Just add to a script of your choice
sc stop wuauserv
sc config wuauserv start= disabled
c:
cd\windows\SoftwareDistribution
ren "Download" "Download_STOPPED"
takeown /f C:\Windows\winsxs\reboot.xml
takeown /f C:\Windows\winsxs\pending.xml
echo y|cacls C:\Windows\winsxs\reboot.xml /p everyone:f
echo y|cacls C:\Windows\winsxs\pending.xml /p everyone:f
del /q C:\Windows\winsxs\reboot.xml
del /q C:\Windows\winsxs\pending.xml
reg.exe delete "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" /f
reg.exe delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer" /v InProgress /f
Setting |
State |
Software\Policies\Microsoft\Windows\WindowsUpdate\DoNotConnectToWindowsUpdateInternetLocations |
1 |
net use \\cswis001\il
mklink /d c:\IL \\cswis001\il
netsh firewall set service type = remotedesktop mode = enable
.