Skip to content

Instantly share code, notes, and snippets.

@vMarkusK
Created October 24, 2018 07:56
Show Gist options
  • Save vMarkusK/76dd85d95ca417ca695f8dab260fad7a to your computer and use it in GitHub Desktop.
Save vMarkusK/76dd85d95ca417ca695f8dab260fad7a to your computer and use it in GitHub Desktop.
Update Get-CIDatastore Threshold
$CiDs = Get-CIDatastore | where {$_.Name -like "LOCAL-*"} | Get-CIView
foreach ($object in $CiDs ){
$Cap = $object.TotalCapacityGb
$red = [math]::round($object.TotalCapacityGb/85, 0)
$yellow = [math]::round($object.TotalCapacityGb/75, 0)
Write-Host "Total Cap: '$cap GB'"
Write-Host "New ThresholdRedGb: '$red GB'"
Write-Host "New ThresholdYellowGb: '$yellow GB'"
$object.ThresholdRedGb = $red
$object.ThresholdYellowGb = $yellow
$object.UpdateServerData()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment