Last active
December 17, 2015 10:18
-
-
Save mbrownnycnyc/5593449 to your computer and use it in GitHub Desktop.
super quick batch script to run microsoft baseline security analyzer against a given list of PCs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo > "%temp%/mbsalistfile.txt" | |
for %%G in (%*) do echo %%G >> "%temp%/mbsalistfile.txt" | |
"%programfiles%\Microsoft Baseline Security Analyzer 2\mbsacli.exe" /nvc /n "OS"+"SQL"+"IIS"+"PASSWORD" /wa /nd /listfile "%temp%/mbsalistfile.txt" | |
"%programfiles%\Microsoft Baseline Security Analyzer 2\mbsacli.exe" /l /rd "%userprofile%\securityscans" | |
pause | |
REM the mbsa files are xml and can be compared as such. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment