Guest User

Untitled

a guest
Mar 19th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. $licenses = Import-Csv $PSScriptRoot\LicenseCounts.csv
  2. [Array]::Reverse($licenses)
  3. $licenses = $licenses[0] | select *available*,*delta*
  4.  
  5. if($licenses.'E3 Available' -ge 25) {
  6. write-output "E3 greater than or equal to 25: $($licenses.'E3 Available')"
  7. $E3AvailableStyle = 'good'
  8. } elseif ($licenses.'E3 Available' -ge 10 -and $licenses.'E3 Available' -lt 25) {
  9. $E3AvailableStyle = 'caution'
  10. } else {
  11. $E3AvailableStyle = 'warning'
  12. }
  13.  
  14. Output:
  15.  
  16. E3 greater than or equal to 25: 4
Add Comment
Please, Sign In to add comment