Jump to content

Please advise re powershell core windows update - something seems broken but I am not sure what...


Recommended Posts

Guest Andydoc
Posted

I have a powershell script that calls windows update to install updates and then restart the machine. The relevant part of the code is posted below:if (-not $SkipUpdates) { Write-ToLog -Message "Starting Windows Update process in background job..." # Create scriptblock for Windows Updates $updateScriptBlock = { # Import the LogMail module at the start of the job Import-Module "C:\Users\andyd\Desktop\System\LogMail" -Verbose # Windows Update process try { $UpdateSession = New-Object -ComObject Microsoft.Update.Session

 

Continue reading...

  • Replies 0
  • Created
  • Last Reply

Popular Days

Popular Days

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...