Page 1 of 1

Check starting mode Windows update service

Published: April 13, 2021 - 5:16 PM
by florentR2
Check the startup mode of the Windows update service (wuauserv).
If different from Automatic audit, refer to WARNING

Code: Select all

def audit():
    a = run_powershell('Write-Host (Get-Service "wuauserv").StartType',output_format='text')
    lines = a.split("\n")
    print('Mode de demarrage du service wuauserv : %s' % lines[0])

    if lines[0] == 'Automatic':
        return "OK"
    else:
        print('LE SERVICE WINDOWS UPDATE N EST PAS EN DEMARRAGE AUTO ! VERIFIER POURQUOI')
        return "WARNING"