locked
WSUS _Local Drive Cleanup RRS feed

  • Question

  • Hello IT Pros ,

    In my Org WSUS Local Drive got full and i am not able to Cleanup the Drive .

    I ran the Server Clean_up toll Several times , but i;m getting only 4 MB not more than that .

    Please Guide me , how do i get space or Cleanup the Drive ?

    And also Some of Client PCs Are not Getting any update from WSUS , is that Space Issue ? or anythings else ?

    Client Error Is- WindowsUpdate_80244018

    Looking forward your quick response ,Thanks!

    • Moved by TorstenMMVP Thursday, November 23, 2017 8:41 AM
    Wednesday, November 22, 2017 11:09 AM

Answers

All replies

  • Is your WSUS integrated with ConfigMgr or stand-alone?

    Jason | https://home.configmgrftw.com | @jasonsandys

    • Marked as answer by Tofan Jena Thursday, November 23, 2017 4:37 AM
    • Unmarked as answer by Tofan Jena Thursday, November 23, 2017 4:37 AM
    Wednesday, November 22, 2017 12:32 PM
  • HI  Jason ,

    It is Stand-alone Server .

    Thursday, November 23, 2017 4:37 AM
  • Moving thread ...

    Torsten Meringer | http://www.mssccmfaq.de

    Thursday, November 23, 2017 8:41 AM
  • Hello ,

    if the below steps did not help .. you need to configure your Wsus server to use single language updates  , 

    remove deprecated products , And re-create the database.

    1 . Decline-SupersededUpdates.ps1 -UpdateServer SERVERNAME -Port 8530  (USS )

    https://blogs.technet.microsoft.com/configurationmgr/2016/01/26/the-complete-guide-to-microsoft-wsus-and-configuration-manager-sup-maintenance/

    2. Set the expired update cleanup threshold from the default of 30 days to 1 days via the following PowerShell script on the Upstream (USS) WSUS server ONLY:

     

    NOTE:  You can create a .PS1 file or simply copy/paste the script into PowerShell ISE and run it on the USS.

     

    [void][reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration")

    $wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::getUpdateServer()

    function Set-WsusRevisionDeletionTimeThreshold{

      param(

        [int] $RevisionDeletionTimeThreshold

        )

        ## This is not a supported API

        $dbConfig=$wsus.GetDatabaseConfiguration();

        $connection=$dbConfig.CreateConnection();

        $connection.Connect();

        $command="update tbconfigurationC set [RevisionDeletionTimeThreshold] = $RevisionDeletionTimeThreshold"

        #write-host $command

        $connection.ExecuteCommandNoResult($command , [System.Data.CommandType]::Text)

        $connection.Close();

        Write-Host RevisionDeletetionTimeThreshhold update to $RevisionDeletionTimeThreshold

    }

    Write-Host Stopping WSUSService...

    stop-service wsusservice

    Set-WsusRevisionDeletionTimeThreshold 1

    Write-Host Starting WSUSService...

    start-service wsusservice

    Write-Host WSUSService Strated

    3. HELP! My WSUS has been running for years without ever having maintenance done and the cleanup wizard keeps timing out.

    https://blogs.technet.microsoft.com/configurationmgr/2016/01/26/the-complete-guide-to-microsoft-wsus-and-configuration-manager-sup-maintenance/

    DECLARE @var1 INT

    DECLARE @msg nvarchar(100)

     

    CREATE TABLE #results (Col1 INT)

    INSERT INTO #results(Col1) EXEC spGetObsoleteUpdatesToCleanup

     

    DECLARE WC Cursor

    FOR

    SELECT Col1 FROM #results

     

    OPEN WC

    FETCH NEXT FROM WC

    INTO @var1

    WHILE (@@FETCH_STATUS > -1)

    BEGIN SET @msg = ‘Deleting ‘ + CONVERT(varchar(10), @var1)

    RAISERROR(@msg,0,1) WITH NOWAIT EXEC spDeleteUpdate @localUpdateID=@var1

    FETCH NEXT FROM WC INTO @var1 END

     

    CLOSE WC

     DEALLOCATE WC

     

    DROP TABLE #results

    4. WSUS Cleanup:

    [reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration")` 

     | out-null 

    $wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer(); 

    $cleanupScope = new-object Microsoft.UpdateServices.Administration.CleanupScope; 

    #$cleanupScope.DeclineSupersededUpdates = $true        

    #$cleanupScope.DeclineExpiredUpdates         = $true 

    $cleanupScope.CleanupObsoleteUpdates     = $true 

    #$cleanupScope.CompressUpdates                  = $true 

    #$cleanupScope.CleanupObsoleteComputers = $true 

    #$cleanupScope.CleanupUnneededContentFiles = $true 

    $cleanupManager = $wsus.GetCleanupManager(); 

    $cleanupManager.PerformCleanup($cleanupScope); 

     

    5. Reset the cleanup threshold back to 30 on the Upstream (USS) WSUS server via the following PowerShell script:

     

    NOTE:  You can create a .PS1 file or simply copy/paste the script into PowerShell ISE and run it on the USS.

     

    [void][reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") $wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::getUpdateServer()

    $configuration = $wsus.GetConfiguration()

    $configuration.RevisionDeletionTimeThreshold = New-TimeSpan -Days 30

    $configuration.Save()

    6. WSUS Cleanup for unneeded files:

    [reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration")` 

     | out-null 

    $wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer(); 

    $cleanupScope = new-object Microsoft.UpdateServices.Administration.CleanupScope; 

    #$cleanupScope.DeclineSupersededUpdates = $true        

    #$cleanupScope.DeclineExpiredUpdates         = $true 

    #$cleanupScope.CleanupObsoleteUpdates     = $true 

    #$cleanupScope.CompressUpdates                  = $true 

    #$cleanupScope.CleanupObsoleteComputers = $true 

    $cleanupScope.CleanupUnneededContentFiles = $true 

    $cleanupManager = $wsus.GetCleanupManager(); 

    $cleanupManager.PerformCleanup($cleanupScope); 

    Make screenshots so we see the results. Also get one like the one below:

    7. set the maxCachedUpdates property to 30000 on the WSUS server:

    File: C:\Program Files\Update Services\WebServices\ClientWebService\web.config

    Value: <add key="maxCachedUpdates" value="30000"/>


    Thursday, November 23, 2017 8:46 AM
  • More info:

    How to Clean Microsoft WSUS Content Folder from Old and unneeded Products

    http://itcalls.blogspot.sg/2013/07/how-to-clean-microsoft-wsus-content.html


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by Tofan Jena Friday, November 24, 2017 4:15 AM
    Thursday, November 23, 2017 8:57 AM
  • Its got resolved .Thanks!
    Thursday, November 23, 2017 11:08 AM
  • Glad to hear that and thanks for your feedback.

    Please remember to click “Mark as Answer” on the post that helps you.


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, November 24, 2017 2:12 AM