Select Page

Required Files: SharedScriptRequiredFile 15,SharedScriptRequiredFile 16


This uses Swiss File Knife to discover large files on the disk that could help in troubleshooting low disk space. This is setup to run on the whole system.


 

Import-Module $env:SyncroModule
 
$32bitWindows = [System.IntPtr]::Size -eq 4
 
 
if($32bitWindows){
 
  # this usually takes about a minute or less
  C:\temp\sfk.exe stat -minsize=50m C:\ | Sort-Object -Descending > C:\temp\50mb-files.txt
 
  gc C:\temp\50mb-files.txt
 
  # this usually takes about a minute or less
  C:\temp\sfk.exe stat -minsize=50m C:\Users | Sort-Object -Descending > C:\temp\50mb-user-files.txt
 
  gc C:\temp\50mb-user-files.txt
 
  # this usually takes about 10 minutes! Lists the 50 biggest files in the folder (C:\)
  #  uncomment the following 2 lines to enable this more intensive listing mode
  #C:\temp\sfk.exe list -big -mbytes C:\ > C:\temp\50-biggest-files.txt
  #gc C:\temp\50-biggest-files.txt
 
} else {
 
  # this usually takes about a minute or less
  C:\temp\sfk64.exe stat -minsize=50m C:\ | Sort-Object -Descending > C:\temp\50mb-files.txt
 
  gc C:\temp\50mb-files.txt
 
  # this usually takes about a minute or less
  C:\temp\sfk64.exe stat -minsize=50m C:\Users | Sort-Object -Descending > C:\temp\50mb-user-files.txt
 
  gc C:\temp\50mb-user-files.txt
 
  # this usually takes about 10 minutes! Lists the 50 biggest files in the folder (C:\)
  #  uncomment the following 2 lines to enable this more intensive listing mode
  #C:\temp\sfk64.exe list -big -mbytes C:\ | Sort-Object -Descending > C:\temp\50-biggest-files.txt
  #gc C:\temp\50-biggest-files.txt
}