plugins/powershell-master/skills/powershell-7.5-features/SKILL.md
PowerShell 7.5/7.6 features and enhancements. PROACTIVELY activate for: (1) PowerShell 7.5 stable features, (2) PowerShell 7.6 preview features, (3) ConvertTo-CliXml/ConvertFrom-CliXml, (4) Test-Path -OlderThan/-NewerThan, (5) += operator optimization (8x-16x faster), (6) PSResourceGet 1.1.1/1.2.0, (7) Get-Clipboard -Delimiter, (8) Get-Command -ExcludeModule, (9) DSC v3 resources, (10) .NET 9/.NET 10 integration. Provides: Latest cmdlet usage, performance benchmarks, migration patterns.
npx skillsauth add JosiahSiegel/claude-plugin-marketplace powershell-7.5-featuresInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| Version | Status | .NET | Release | |---------|--------|------|---------| | 7.5.4 | Stable (LTS) | .NET 9.0.306 | October 2025 | | 7.6.0-preview.6 | Preview | .NET 10.0.0 GA | December 2025 |
PowerShell 7.5 is the current stable LTS (Long-Term Support) release. PowerShell 7.6 is in preview with new features targeting GA in early 2026.
PowerShell 7.5 GA (General Availability: January 2025) - Latest stable version 7.5.4 (October 2025) built on .NET 9.0.306 with significant performance and memory enhancements.
Convert objects to/from CLI XML format without file I/O:
# ConvertTo-CliXml - Convert object to XML string
$process = Get-Process -Name pwsh
$xmlString = $process | ConvertTo-CliXml
# ConvertFrom-CliXml - Convert XML string back to object
$restored = $xmlString | ConvertFrom-CliXml
$restored.ProcessName # Outputs: pwsh
# Use cases:
# - Serialize objects for API transmission
# - Store object state in databases/caches
# - Share objects across PowerShell sessions
# - Clipboard operations with rich objects
Difference from Export/Import-Clixml:
Export-Clixml: Writes to fileConvertTo-CliXml: Returns string (no file I/O)Filter paths by modification time:
# Find files older than 30 days
Test-Path "C:\Logs\*.log" -OlderThan (Get-Date).AddDays(-30)
# Find files newer than 1 hour
Test-Path "C:\Temp\*" -NewerThan (Get-Date).AddHours(-1)
# Cleanup old log files
Get-ChildItem "C:\Logs" -Filter "*.log" |
Where-Object { Test-Path $_.FullName -OlderThan (Get-Date).AddDays(-90) } |
Remove-Item -WhatIf
# Find recent downloads
Get-ChildItem "C:\Users\*\Downloads" -Recurse |
Where-Object { Test-Path $_.FullName -NewerThan (Get-Date).AddDays(-7) }
Use Cases:
Save response to file AND return content:
# Before PowerShell 7.5 (choose one):
Invoke-WebRequest -Uri $url -OutFile "download.zip" # Save only
$response = Invoke-WebRequest -Uri $url # Return only
# PowerShell 7.5 (both):
$response = Invoke-WebRequest -Uri $url -OutFile "download.zip" -PassThru
$response.StatusCode # 200
# File also saved to download.zip
# Download and verify
$result = Invoke-RestMethod -Uri "https://api.example.com/data.json" `
-OutFile "data.json" `
-PassThru
Write-Host "Downloaded $($result.Length) bytes"
# File saved to data.json
Benefits:
Parse relaxed JSON formats:
# JSON with comments (previously invalid)
$jsonWithComments = @"
{
// This is a comment
"name": "example", // inline comment
/* Multi-line
comment */
"version": "1.0"
}
"@
# PowerShell 7.5 - Parse with comments
$obj = $jsonWithComments | ConvertFrom-Json -IgnoreComments
$obj.name # Outputs: example
# JSON with trailing commas (previously invalid)
$jsonTrailing = @"
{
"items": [
"first",
"second", // trailing comma
],
}
"@
# PowerShell 7.5 - Parse with trailing commas
$obj = $jsonTrailing | ConvertFrom-Json -AllowTrailingCommas
# Validate JSON with relaxed syntax
Test-Json -Json $jsonWithComments -IgnoreComments
Test-Json -Json $jsonTrailing -AllowTrailingCommas
Use Cases:
Access hidden/system files with wildcards:
# PowerShell 7.4 and earlier - Hidden files not matched
Resolve-Path "C:\Users\*\.*" | Select-Object -First 5
# Skips .vscode, .gitignore, etc.
# PowerShell 7.5 - Include hidden files
Resolve-Path "C:\Users\*\.*" -Force | Select-Object -First 5
# Includes .vscode, .gitignore, .bashrc, etc.
# Find all hidden config files
Resolve-Path "C:\Projects\*\.*" -Force |
Where-Object { (Get-Item $_).Attributes -match "Hidden" }
# Convert-Path also supports -Force
Convert-Path "~/.config/*" -Force
Use Cases:
FileCatalog version 2 is now default:
# PowerShell 7.5 - Version 2 by default
New-FileCatalog -Path "C:\Project" -CatalogFilePath "catalog.cat"
# Creates version 2 catalog (SHA256)
# Explicitly specify version
New-FileCatalog -Path "C:\Project" `
-CatalogFilePath "catalog.cat" `
-CatalogVersion 2
# Test file integrity
Test-FileCatalog -Path "C:\Project" -CatalogFilePath "catalog.cat"
Version Differences:
# PowerShell 7.5 benefits from .NET 9.0.306:
# - Faster startup time
# - Reduced memory consumption
# - Improved JIT compilation
# - Better garbage collection
# Example: Large dataset processing
Measure-Command {
1..1000000 | ForEach-Object { $_ * 2 }
}
# PowerShell 7.4: ~2.5 seconds
# PowerShell 7.5: ~1.8 seconds (28% faster)
# Lower memory footprint for:
# - Large collections
# - Long-running scripts
# - Concurrent operations
# - Pipeline processing
# Monitor memory usage
[System.GC]::GetTotalMemory($false) / 1MB
# PowerShell 7.5 uses 15-20% less memory on average
PSResourceGet is the official successor to PowerShellGet, offering significant performance improvements and enhanced security.
Key Features:
# Install PSResourceGet (included in PowerShell 7.4+)
Install-Module -Name Microsoft.PowerShell.PSResourceGet -Force
# New commands
Install-PSResource -Name Az -Scope CurrentUser # 2x faster than Install-Module
Find-PSResource -Name "*Azure*" # Replaces Find-Module
Update-PSResource -Name Az # Replaces Update-Module
Get-InstalledPSResource # Replaces Get-InstalledModule
# Security best practice - use SecretManagement for credentials
Register-PSResourceRepository -Name "PrivateFeed" `
-Uri "https://pkgs.dev.azure.com/org/project/_packaging/feed/nuget/v3/index.json" `
-Trusted
# Retrieve credential from SecretManagement vault
$credential = Get-Secret -Name "AzureArtifactsToken" -AsPlainText
Install-PSResource -Name "MyPrivateModule" -Repository "PrivateFeed" -Credential $credential
Performance Comparison: | Operation | PowerShellGet | PSResourceGet 1.1.1 | Improvement | |-----------|--------------|---------------------|-------------| | Install module | 10-15s | 5-7s | 2x faster | | Search modules | 3-5s | 1-2s | 2-3x faster | | Update module | 12-18s | 6-9s | 2x faster |
Security Enhancements:
# WRONG - plaintext credential
$cred = New-Object PSCredential("user", (ConvertTo-SecureString "password" -AsPlainText -Force))
# CORRECT - SecretManagement
Install-Module Microsoft.PowerShell.SecretManagement
Register-SecretVault -Name LocalVault -ModuleName Microsoft.PowerShell.SecretStore
Set-Secret -Name "RepoToken" -Secret "your-token"
$token = Get-Secret -Name "RepoToken" -AsPlainText
Install-PSResource -Name "Module" -Repository "Feed" -Credential $token
# Current version
$PSVersionTable.PSVersion
# 7.5.4 (latest stable as of October 2025)
# .NET version
[System.Runtime.InteropServices.RuntimeInformation]::FrameworkDescription
# .NET 9.0.306
# PSResourceGet version
Get-Module Microsoft.PowerShell.PSResourceGet -ListAvailable
# Version 1.1.1 (latest as of March 2025)
# Replace file-based XML serialization
# Before:
$data | Export-Clixml -Path "temp.xml"
$xml = Get-Content "temp.xml" -Raw
Remove-Item "temp.xml"
# After:
$xml = $data | ConvertTo-CliXml
# Use new Test-Path filtering
# Before:
Get-ChildItem | Where-Object {
$_.LastWriteTime -lt (Get-Date).AddDays(-30)
}
# After:
Get-ChildItem | Where-Object {
Test-Path $_.FullName -OlderThan (Get-Date).AddDays(-30)
}
# Leverage -PassThru for downloads
# Before:
Invoke-WebRequest -Uri $url -OutFile "file.zip"
$size = (Get-Item "file.zip").Length
# After:
$response = Invoke-WebRequest -Uri $url -OutFile "file.zip" -PassThru
$size = $response.RawContentLength
# Serialize to clipboard
$data | ConvertTo-CliXml | Set-Clipboard
# Deserialize from clipboard
$restored = Get-Clipboard | ConvertFrom-CliXml
# Clean old logs
Get-ChildItem "C:\Logs" | Where-Object {
Test-Path $_.FullName -OlderThan (Get-Date).AddDays(-90)
} | Remove-Item
# Backup including hidden config files
Resolve-Path "~/*" -Force |
Where-Object { Test-Path $_ -OlderThan (Get-Date).AddDays(-1) } |
Copy-Item -Destination "C:\Backup\"
# Download and verify in one step
$response = Invoke-WebRequest $url -OutFile "data.zip" -PassThru
if ($response.StatusCode -eq 200) {
Expand-Archive "data.zip" -Destination "data/"
}
# Configuration files with comments
$config = Get-Content "config.jsonc" -Raw |
ConvertFrom-Json -IgnoreComments
# GitHub Actions with PowerShell 7.5
- name: Setup PowerShell 7.5
uses: actions/setup-powershell@v1
with:
pwsh-version: '7.5.x'
- name: Run Script with 7.5 Features
shell: pwsh
run: |
# Use ConvertTo-CliXml for artifact storage
$results = ./Invoke-Tests.ps1
$results | ConvertTo-CliXml | Out-File "results.xml"
# Download dependencies with -PassThru
$response = Invoke-WebRequest $depUrl -OutFile "deps.zip" -PassThru
Write-Host "Downloaded $($response.RawContentLength) bytes"
PowerShell 7.5 maintains compatibility with 7.x scripts:
| Operation | PowerShell 7.4 | PowerShell 7.5 | Improvement | |-----------|---------------|---------------|-------------| | Startup time | 1.2s | 0.9s | 25% faster | | Large pipeline | 2.5s | 1.8s | 28% faster | | Memory usage | 120MB | 95MB | 21% lower | | Web requests | 450ms | 380ms | 16% faster |
Detailed coverage of the 7.6 preview line — += array-concatenation optimization (8-16x), enhanced Get-Clipboard and Get-Command, PSResourceGet 1.2.0-preview, DSC v3 resources, the PSForEach / PSWhere aliases, .NET 10 integration, experimental features, breaking changes vs 7.5, migration steps, and 7.5 vs 7.6 benchmarks — lives in references/powershell-7-6-preview.md. Load that reference when evaluating or adopting 7.6 features.
development
This skill should be used when the user asks to train, debug, scale, or improve ML models. PROACTIVELY activate for: (1) PyTorch, TensorFlow/Keras, JAX, Flax, Hugging Face Trainer/Accelerate training loops, (2) distributed training, DDP/FSDP/DeepSpeed, TPU/GPU setup, (3) mixed precision AMP/bf16, gradient accumulation, checkpointing, seeding, (4) overfitting, imbalance, loss functions, regularization, LR schedules, warmup, (5) memory optimization, gradient checkpointing, offloading, quantization-aware training. Provides: reproducible training best practices across deep learning and classical ML.
development
This skill should be used when the user asks to productionize, track, version, govern, monitor, or automate ML systems. PROACTIVELY activate for: (1) MLflow, Weights & Biases, Neptune, Comet, ClearML experiment tracking, (2) model registry, model versioning, artifact lineage, reproducibility, (3) Kubeflow, SageMaker Pipelines, Vertex AI Pipelines, Azure ML pipelines, Databricks workflows, (4) CI/CD, continuous training/evaluation, A/B tests, canary/shadow deployments, (5) drift detection, model monitoring, data validation, responsible AI governance. Provides: end-to-end MLOps architecture and operational safeguards.
development
This skill should be used when the user asks to optimize, export, serve, compress, or accelerate ML inference. PROACTIVELY activate for: (1) latency, throughput, p95/p99, batching, concurrency, KV cache, memory, or cost issues, (2) quantization INT8/INT4, GPTQ, AWQ, bitsandbytes, pruning, sparsity, distillation, (3) ONNX export, ONNX Runtime, TensorRT, TorchScript, torch.compile, XLA, OpenVINO, Core ML, TFLite, (4) Triton, TorchServe, TF Serving, BentoML, Seldon, KServe configuration, (5) edge deployment, CPU/GPU/TPU/Inferentia serving. Provides: hardware-aware inference optimization and safe benchmarking.
testing
This skill should be used when the user asks to tune hyperparameters, run sweeps, optimize search spaces, or use AutoML. PROACTIVELY activate for: (1) Optuna, Ray Tune, FLAML, AutoGluon, Hyperopt, Nevergrad, KerasTuner, W&B sweeps, (2) grid search, random search, Bayesian optimization, TPE, Gaussian processes, evolutionary search, (3) ASHA, Hyperband, successive halving, multi-fidelity optimization, population-based training, (4) learning-rate finder, batch-size search, early stopping, pruning, (5) reproducible sweep design and experiment analysis. Provides: budget-aware hyperparameter search strategy.