we are trying to Automate the security patch through powershell .msu file and using Ansible

Prasath, R [ REGIONAL IT ] 0 Reputation points
2024-07-17T06:17:45.6633333+00:00

  • name: Install Windows updates using PowerShell hosts: patchinstall tasks:
    • name: Install kb5040430 update win_shell: > $msuFile="C:\Users\Administrator\Documents\july-2019\windows10.0-kb5040430-x64_9879d14c817a7aec56b0ae1f73daecc7a678b3aa.msu"

      Start the installation process using wusa.exe with arguments for silent installation and no restart

      Start-Process -FilePath "wusa.exe" -ArgumentList ""$msuFile" /quiet /norestart /log:"$logFile" -Wait register: install_output
    • name: Display the installation output debug: var: install_output.stdout
Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,748 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.