How to do it

We will use the same script as the previous recipe.

  1. Assign the object returned by the previous recipe to a variable.
$FileCleanupInfo = (& //path/to/02-Clear-LogFiles.ps1)
  1. Call the SpaceCleared property and divide it by Administrative Constants.
$FileCleanupInfo.SpaceCleared/1KB
$FileCleanupInfo.SpaceCleared/1MB
$FileCleanupInfo.SpaceCleared/1GB

Notice how the results are not just the numbers divided by powers of 1000.

  1. To show how much of space got cleared from a 250 GB SSD:
($FileCleanupInfo.SpaceCleared)/(250*1e9)*100

An almost negligible number in our case, but here it is.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.25.74