Showing results for 
Search instead for 
Did you mean: 
Create Post

Executing Dism.exe from SolarWinds

Does anyone try to execute from SW server the dism command to clean the winsxs or repair old images?

It seems that we have to have in mind the OS version, Powershell version and other details (IIS, DMZ, credential issues)>

Tags (2)
0 Kudos
1 Reply

Just adding some of the research I did.

Analyze and clean the WinSXS folder - gHacks Tech News


#Determine the PS_Version
what-if PSVersion is old than 4, use these commands


                # Empty Recycle Bin                 write-Host "Emptying Recycle Bin." -ForegroundColor Cyan                        $Recyclebin.items() | %{ remove-item $_.path -Recurse -verbose -Confirm:$false}                         # Remove Windows Temp Directory            delete($WinTemp)               
                 # Remove Prefetch folder content             delete($Prefetch) 
##Execution##        # Remove temp files located in "C:\Users\USERNAME\AppData\Local\Temp"              [double]$a=before($temp2)           msg($temp2)           Remove-Item -Recurse  "$temp2\*" -Force -Verbose            [double]$b=post($temp2)               $total=$a-$b           totalmsg($temp2,$total)     

Windows Server 2008 R2
Windows Server 2008

0 Kudos