The Test.ps1 script validates your PowerShell development environment by checking all installed components and their configurations.
Purpose: Comprehensive environment validation
Features:
- ✅ Check all component installations
- ✅ Report component versions
- ✅ Validate configurations
- ✅ Categorized output (Winget, Modules, Custom)
- ✅ Summary statistics
# Run full environment validation
.\Scripts\Test.ps1╔════════════════════════════════════════════════════════════╗
║ ║
║ PowerShell Environment Validation ║
║ ║
╚════════════════════════════════════════════════════════════╝
═══ PowerShell ═══
✓ PowerShell (7.4.1)
═══ Winget Packages ═══
✓ oh-my-posh (19.14.2)
✓ Yazi (0.2.4)
✓ fzf (0.44.1)
✓ zoxide (3.8.0)
✓ Microsoft Edit (1.0.0)
⊘ gsudo (optional - not installed)
═══ PowerShell Modules ═══
✓ PSFzf (2.5.22)
✓ Terminal-Icons (0.11.0)
✓ F7History (1.0.0)
✓ posh-git (1.1.0)
⊘ PowerColorLS (optional - not installed)
═══ Configuration Components ═══
✓ Yazi Configuration (Git-managed)
✓ PowerShell Profile (Deployed)
✓ Windows Terminal (Configured)
⚠ CaskaydiaCove Nerd Font not set as default
╔════════════════════════════════════════════════════════════╗
║ SUMMARY ║
╚════════════════════════════════════════════════════════════╝
Required Components: 14 / 14 installed
Optional Components: Included in total count
Total: 14 / 16 installed
🎉 All required components are installed!
Your PowerShell environment is ready to go!
- Installation status
- Installed version
- Availability in PATH
- Module availability
- Module version
- Import capability
- Yazi configuration presence
- PowerShell profile deployment
- Windows Terminal settings
- Font configuration
| Code | Meaning |
|---|---|
| 0 | All required components installed |
| 1 | One or more required components missing |
| Symbol | Meaning | Color |
|---|---|---|
| ✓ | Installed | Green |
| ✗ | Missing (required) | Red |
| ⊘ | Not installed (optional) | Yellow |
| ⚠ | Installed with issues | Yellow |
🎉 All required components are installed!
Your PowerShell environment is ready to go!
You're ready to use all features.
⚠️ 2 component(s) missing
Run the setup script to install missing components:
.\Setup.ps1
Run Setup.ps1 to install missing components.
If you see warnings:
✓ Windows Terminal (Configured)
⚠ CaskaydiaCove Nerd Font not set as default
Follow the specific guidance provided.
# In CI pipeline
.\Scripts\Test.ps1
if ($LASTEXITCODE -ne 0) {
Write-Error "Environment validation failed"
exit 1
}# Add to your workflow
function Start-Work {
.\Scripts\Test.ps1
if ($LASTEXITCODE -eq 0) {
Write-Host "Environment validated. Starting work..."
} else {
Write-Host "Please run Setup.ps1 first"
}
}