Created
March 10, 2018 23:20
-
-
Save corbob/c8fdbabf78c4c174b80ff8d14f871eda to your computer and use it in GitHub Desktop.
why? But Why...
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
$licenses = Import-Csv $PSScriptRoot\LicenseCounts.csv | |
[Array]::Reverse($licenses) | |
$licenses = $licenses[0] | select *available*,*delta* | |
if($licenses.'E3 Available' -ge 25) { | |
write-output "E3 greater than or equal to 25: $($licenses.'E3 Available')" | |
$E3AvailableStyle = 'good' | |
} elseif ($licenses.'E3 Available' -ge 10 -and $licenses.'E3 Available' -lt 25) { | |
$E3AvailableStyle = 'caution' | |
} else { | |
$E3AvailableStyle = 'warning' | |
} | |
Output: | |
E3 greater than or equal to 25: 4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment