Created
October 14, 2022 17:29
-
-
Save pmacMaps/88563a446ca00b2a3b03968e75e4e8a3 to your computer and use it in GitHub Desktop.
BAT file for checking ArcGIS Enterprise for patches, and installing them. Write messages to a text file for further review.
This file contains 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
rem turn off console printing | |
@echo off | |
rem set variables for date components (used in log file name) | |
For /f "tokens=2-4 delims=/ " %%a in ("%DATE%") do ( | |
SET YYYY=%%c | |
SET MM=%%a | |
SET DD=%%b | |
) | |
rem set-uo text file to write messages to | |
SET logFile=AGS_ENT_Patches_%MM%_%DD%_%YYYY%.txt | |
rem write results of patch notification tool to text file | |
rem update directory where log file (.txt) is saved | |
> "C:\scripts\logs\%logFile%" ( | |
rem run arcgis enterprise patching program | |
rem update path for where bat file is located, if needed | |
cd "C:\Program Files\ArcGIS\Server\tools\patchnotification" && call patchnotification.bat -c -i all | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment