Created
January 2, 2019 11:46
-
-
Save gioxx/5aea866ae31099489d1c565be55438ae to your computer and use it in GitHub Desktop.
Un'integrazione per rilevare lo spazio disco usato e quello libero, da inserire all'interno dello script di pulizia WSUS (vedi articolo: https://gioxx.org/2016/08/09/wsus-clean-ps1/)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write-Output "" | |
$drive = Get-PSDrive C | |
Write-Output "$((get-date).ToLongTimeString()) $server - $($drive.root) Disk Usage..." | |
$used_size = $drive.used | |
$free_size = $drive.free | |
Write-Output "Used space:" ($used_size / 1GB) | |
Write-Output "Free space:" ($free_size / 1GB) | |
Write-Output "$((get-date).ToLongTimeString()) $server - $($drive.root) Disk Usage complete." | |
Write-Output "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment