Jump to content
Brandan

Script to empty SoftwareDistribution Folder. Clear out Windows updates.

Recommended Posts

Here is a Batch script to empty the SoftwareDistribution Folder.  It stops any installer processes in the background, temporarily disables the Windows Update Service, deletes everything in the Software Distribution folder then sets the Windows update service back to automatic and starts the service.

@echo off
CD C:\
taskkill /F /im setup.exe
taskkill /F /im ose00000.exe
taskkill /F /im msiexec.exe

sc config wuauserv start= disabled
net stop wuauserv

PowerShell.exe Remove-Item C:\Windows\SoftwareDistribution\* -Force -Recurse

sc config wuauserv start= demand
net start wuauserv

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.


  • Similar Content

    • By NadeCatcher
      Hello,
      I've been trying to turn on my computer when I'm away from the house using both mobile data and another WiFi connection. When I'm on the same network the wake up command works but if I'm using mobile data I'll get the message "Wake up command failed" and when I'm on another network it says "wake up command sent" but nothing happens. I have the necessary port forwarded (UDP 9) and through the Pulseway android app port monitor I can see it works. Any help would be greatly appreciated.
      Thanks
    • By General_Snuss
      I changed phones recently and the new app says:
      'This device is pending approval. Login to the WebApp and approve it from the account devices page.'
      If I got to https://my.pulseway.com/main/account/devices there is no device to approve.
      Am I doing something wrong?
    • By Louwrens
      Please expand the list of programs on 3rd Party Patch management.
      Some suggestions:
      Adobe Flash
      Amazon Corretto (Since Oracle Java is not free anymore)
      Dropbox
      Gimp
      Google Gsync (GSuite)
      K-lite Codec
      LibreOffice
      OpenVPN
      Thunderbird
      WhatsApp Desktop Client
       
       
       
    • By Andy Raybould
      Hi
      Could someone assist in helping me to set up an alert when a network connection is dropped.
      This is happening at one of my client sites after changing to a new ISP. The ISP says the router/switch is fine but connections are dropping.
      I would like to be able to log when a connection drops (ideally knowing if the internet connection has dropped or just the internal network connection)
      I'm not sure a simple ping notification is good enouh in Pulseway to do this as I need to know if the connection has dropped for a few mseconds as well as larger outages.
      I guess the Event Viewer holds the answers but would appreciate it if anyone has done this before if they could share their thoughts.
      Thank you, Andy
    • By Perks
      Hi,
      Has anyone got some advice on monitoring McAfee please? We need a way to monitor to the AutoUpdate so it alerts us if this has not run.
      Previously we have a script that checks the registry of each server then sends an email with the information, however we would like to replace this with a Pulseway alert if out of date.
      I have searched the forum but the last post is from 2012 so i was hoping there is a solution to this. Also looked from registry/WMI queries but that seems to be for reporting rather than monitoring.
      Thanks.
       
×
×
  • Create New...