Created
October 24, 2018 07:56
-
-
Save vMarkusK/76dd85d95ca417ca695f8dab260fad7a to your computer and use it in GitHub Desktop.
Update Get-CIDatastore Threshold
This file contains hidden or 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
$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