SCCM Inbox Folders plays Vital Role in troubleshooting problems with different components. You should keep an Eye on the inbox folders for a backlog of files that wait to be processed.
There are various methods to monitor the inbox folders (tools/Scripts etc). This Post is going to be focus on Despooler.Box\Receive and clean up files residing older than 30 days.
Despooler.box\Receive stores the data that is received from a child site or a parent site and process it accordingly.Typically, files are processed and moved as soon as Configuration Manager 2007 receives the instruction file (.ins file).
In Short about what despooler does is Despooler component receives the data and hands it off to Replication Manager component then Replication Manager hands the data to the appropriate component to process further.
But Due to some Reasons,Packages which are sending from hierarchy to child sites stuck and breaks the thread and it again starts sending from beginning.Because of this,files remains in Receive folder without being processed for longer time.
If you are in small environment (less than 10 sites or so) you can check it manually by looking at Despooler.Box\Receive what files are Old based on modified date and remove them.
Here is simple VB script that looks for the folder name and get file name,Size and modifieddate. If the Despooler is receiving any files from its parent, you get current date.
Set fso = CreateObject("Scripting.FileSystemObject")
Set objinputfile=fso.OpenTextFile("C:\Scripts\Servers.txt",1,True)
Set objoutputfile=fso.OpenTextFile("C:\Scripts\Results.csv",2,True)
Do While Not objinputfile.AtEndOfStream
strcomputer=objinputfile.ReadLine
Set recive = fso.GetFolder("\\" & strComputer & "\Driveletter$\SCCM\inboxes\despoolr.box\receive")
Set colFiles = recive.Files
For Each objFile in colFilesobjoutputfile.WriteLine strComputer & vbTab & objFile.Name & vbTab & objFile.size & vbTab & objFile.DateLastModified
Next
loop
msgbox("done")
Note : If you have sccm installed on different Drives with different folder names without unique ,this script may not be helpful to you.
Provide all the site names to servers.txt and results will be piped to results.csv file.
Once you get the results,you can sort it with File Size and Modifieddate to take further action.
I would prefer to delete the files from receive folder older than month.
Here you go with the script to delete files from despoolr.box\receive older than 30 days:
Set fso = CreateObject("Scripting.FileSystemObject")
Set objinputfile=fso.OpenTextFile("C:\Scripts\desplooer-servers.txt",1,True)
Set objoutputfile=fso.OpenTextFile("C:\Scripts\despooler-results.csv",2,True)
Do While Not objinputfile.AtEndOfStream
strcomputer=objinputfile.ReadLineSet objWMIService = GetObject("winmgmts:\\" & strComputer)
If Err.Number <> 0 Then
objoutputfile.WriteLine (strcomputer & " is not Up or problem in connecting to WMI")
Err.Clear
Else
strDays= 30
Set recive = fso.GetFolder("\\" & strComputer & "\f$\SMS\inboxes\despoolr.box\receive")
Set colFiles = recive.Files
For Each objFile in colFiles
If DateDiff("d", objFile.DateLastModified, Date) > strDays Then
fso.DeleteFile(objFile)
objoutputfile.WriteLine strComputer & vbTab & "Deleted"
end ifNext
end if
loop
msgbox("done")
Until then !
1 Comment
Pingback: SCCM inboxes despoolr.box receive taking too much disk space - Sharing IT solutions one person at a time