Here’s a quick script I wrote to debug issues with Windows Update if you ever need to pass information along to IT.
To be run in git-bash and in it’s own folder.
###########################################
#### Declare Output Directory Settings ####
###########################################
OUTPUT_PATH="."
FOLDER_NAME=$(date +"%Y-%m-%d_%H-%M-%S")
FOLDER_PATH="$OUTPUT_PATH/$FOLDER_NAME"
mkdir -p "$FOLDER_PATH"
######################
#### Do Work ####
######################
cp /c/Windows/Logs/WindowsUpdate/* "$FOLDER_PATH"
cat /c/Windows/Logs/CBS/CBS.log > "$FOLDER_PATH/CBS.log"
cp /c/ProgramData/USOShared/Logs/* "$FOLDER_PATH"
PowerShell.exe -command "Get-WindowsUpdateLog -LogPath \"$FOLDER_PATH/WindowsUpdate.log\""
cat "$FOLDER_PATH/WindowsUpdate.log"