Hello,
Thank you for your question and for reaching out with your question today.
Please see the script example below for how to disable Windows Update:
set the Windows Update service to "disabled"
sc.exe config wuauserv start=disabled
display the status of the service
sc.exe query wuauserv
stop the service
sc.exe stop wuauserv
If the reply was helpful, please don’t forget to upvote or accept as answer.