Skip to content

Instantly share code, notes, and snippets.

@guitarrapc
Created June 25, 2018 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guitarrapc/ee05c9cf72dbf681c5e0a67d0f908f9d to your computer and use it in GitHub Desktop.
Save guitarrapc/ee05c9cf72dbf681c5e0a67d0f908f9d to your computer and use it in GitHub Desktop.
$user ="Input UserName"
$credential = Get-SumoCredential -User $user -force
# Obtain Collectors
if (($collectors.Length -ne $null) -and ($(Read-Host "Do you want to get new collectors? (y/n)") -eq "y"))
{
Write-Verbose "Calling Sumo API to get current Collectors"
$Collectors = Get-SumoApiCollectors -Credential $credential
Write-Host "Now you have $($collectors.count) collectors objects." -ForegroundColor Cyan
}
else
{
Write-Host "Using existing colletors. skip Get-SumoApiCollectors." -ForegroundColor Cyan
}
# Display Collector OS
Write-Host "Display Collectors group by osName" -ForegroundColor Cyan
$Collectors | group osName -NoElement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment