Skip to content

Instantly share code, notes, and snippets.

@adilio
Created April 11, 2026 19:13
Show Gist options
  • Select an option

  • Save adilio/bb62f951fad8b688bc15e6daeda80110 to your computer and use it in GitHub Desktop.

Select an option

Save adilio/bb62f951fad8b688bc15e6daeda80110 to your computer and use it in GitHub Desktop.
PSCumulus Talk Demo — copy-paste commands

PSCumulus Talk Demo

Setup

Install-Module PSCumulus -Scope CurrentUser
Import-Module PSCumulus
Invoke-WebRequest https://raw.githubusercontent.com/adilio/PSCumulus/main/scripts/demo-setup.ps1 -OutFile demo-setup.ps1
. ./demo-setup.ps1

Connect

Connect-Cloud -Provider Azure, AWS, GCP

Inventory

Get-CloudInstance -All
Get-CloudInstance -All | Where-Object { $_.Tags['environment'] -eq 'prod' }
Get-CloudInstance -All | Group-Object Provider | Select-Object Name, Count

Tagging compliance

Get-CloudInstance -All | Where-Object { -not $_.Tags['owner'] }

Cost waste candidates

$cutoff = (Get-Date).AddDays(-30)
Get-CloudInstance -All |
    Where-Object { $_.Status -ne 'Running' -and $_.CreatedAt -lt $cutoff } |
    Select-Object Name, Provider, Status, CreatedAt |
    Format-Table -AutoSize

Fleet health

Get-CloudInstance -All |
    Group-Object Provider, Status |
    Select-Object Name, Count |
    Sort-Object Count -Descending |
    Format-Table -AutoSize

Cost-center rollup

Get-CloudInstance -All |
    Group-Object { $_.Tags['cost-center'] } |
    Select-Object Name, Count |
    Sort-Object Count -Descending |
    Format-Table -AutoSize

Oldest instances

Get-CloudInstance -All |
    Where-Object { $_.CreatedAt } |
    Sort-Object CreatedAt |
    Select-Object Name, Provider, Region, CreatedAt -First 5 |
    Format-Table -AutoSize

Run everything at once

Invoke-AllDemoQueries

Cleanup

Remove-DemoSetup             # unload module, remove demo functions from session
Remove-DemoSetup -Uninstall  # also uninstall PSCumulus from the system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment