Intermediatereporting
GCP VM Snooze SousChef
Professional PowerShell script that discovers and analyzes stopped compute instances across Google Cloud Platform projects like a sous chef organizing ingredients in a professional kitchen. Fast gcloud CLI integration with comprehensive CSV + HTML reporting.
⏱️ Prep Time:Perfect stir-fry timing
🧩 Difficulty:Intermediate
🔍 What It Does
- 🖥️ Native gcloud CLI integration for authenticated access and reliable data retrieval
- ⚡ High-performance parallel processing across projects and zones with configurable concurrency limits
- 📁 Automatic project discovery or targeted project analysis for focused resource management
- 🌍 Smart zone discovery with filtering capabilities and support for zone-specific targeting
- 👤 Comprehensive owner detection through GCP labels for accountability and lifecycle management
- 📅 Intelligent age calculation with configurable age-based filtering for lifecycle decisions
- 📊 Dual report formats: structured CSV for analysis and rich HTML for executive presentation
- 📈 Real-time performance tracking with progress monitoring and API call statistics
⚙️ Requirements Checklist
- ✅ PowerShell 5.1+ with parallel job support and advanced cmdlets
- ✅ Google Cloud SDK (gcloud CLI) installed and properly configured
- ✅ Active gcloud authentication with access to target GCP projects
- ✅ Compute Engine Viewer role or equivalent permissions across target projects
- ✅ Network connectivity to Google Cloud API endpoints
📌 Talk Nerdy Tip:
Start with a complete organization scan to get baseline visibility, then use age-based filtering (30+ days) for focused cleanup analysis. Like taking inventory of your entire kitchen before deciding what to keep. 👨🍳
gcp-instancesgoogle-cloudstopped-instancesresource-discoverypowershellgcloud-clicsv-exporthtml-reportsparallel-processinglifecycle-management