Skip to main content
skill CX Codex

powershell-2025-changes — Claude Code skill

powershell-2025-changes is a Claude Code skill that lists PowerShell changes in 2025 and replacement cmdlets for scripts affected by them.

MIT 174 installs ★ 66 updated 2026-06-18

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add JosiahSiegel/claude-plugin-marketplace --skill powershell-2025-changes -a claude-code
Open on GitHub

What powershell-2025-changes does

Treat it as a calendar for Windows automation that breaks in 2025. PowerShell 2.0 is gone from Windows 11 24H2 (August 2025) and Windows Server 2025 (September 2025). The MSOnline and AzureAD modules shut down completely, with May 31 and March 30 as the cutoffs, so a pipeline that still calls Connect-MsolService will fail on schedule.

The skill maps old cmdlets onto Microsoft.Graph equivalents, Get-MsolUser to Get-MgUser and Get-MsolGroup to Get-MgGroup, and names the permission scope each call needs. A second route runs through Microsoft.Graph.Entra with Connect-Entra. Package work moves to PSResourceGet (Install-PSResource, Find-PSResource), and WMIC queries get a Get-CimInstance rewrite.

Other sections cover Test-Json dropping Draft 4 schemas on 7.4+, the removal of #Requires -PSSnapin, and hardening with JEA and WDAC. The skill activates by itself once a session touches these topics.

What it helps with

  • port AzureAD scripts to Microsoft.Graph cmdlets
  • strip -Version 2.0 from PowerShell invocations
  • swap Install-Module for Install-PSResource
  • rewrite WMIC queries with Get-CimInstance
  • fix Test-Json calls that still pass Draft 4 schemas

Example prompts for the agent

  • Rewrite the Connect-AzureAD and Get-AzureADUser calls in my script to Microsoft.Graph
  • Check my scripts for -Version 2.0 and tell me what breaks once PowerShell 2.0 is removed
  • Replace Install-Module with Install-PSResource in the build module

How to install powershell-2025-changes

1Skills CLI (Vercel)

npx skills add JosiahSiegel/claude-plugin-marketplace --skill powershell-2025-changes -a claude-code

2Manually: put the files in place

~/.claude/skills/powershell-2025-changes/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/powershell-2025-changes/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about powershell-2025-changes

How do I install powershell-2025-changes in Claude Code?

Run npx skills add JosiahSiegel/claude-plugin-marketplace --skill powershell-2025-changes -a claude-code. The skill lands in ~/.claude/skills/powershell-2025-changes/SKILL.md.

What does powershell-2025-changes do?

It gathers the shutdown dates for MSOnline and AzureAD, the removal of PowerShell 2.0 and WMIC, and the migration to Microsoft.Graph and PSResourceGet into one reference the agent picks up on its own.

What replaces the AzureAD module?

Microsoft.Graph, with cmdlets such as Get-MgUser and Update-MgUser. Workflows built around AzureAD can also use Microsoft.Graph.Entra, which offers Connect-Entra.

Source text

SKILL.md · MIT
---
name: powershell-2025-changes
description: |
  Critical PowerShell changes, deprecations, and migrations for 2025.
  PROACTIVELY activate for: (1) PowerShell 7.5 GA changes, (2) PowerShell 7.6 preview features, (3) Windows PowerShell 5.1 deprecation timeline, (4) PSReadLine 2.4+ updates, (5) Az PowerShell 14.x breaking changes, (6) Microsoft.Graph migration from AzureAD/MSOnline modules, (7) PSResourceGet replacing PowerShellGet 2.x, (8) DSC v3 and migration from DSC v1/v2, (9) ExecutionPolicy and constrained language mode updates, (10) .NET 9/.NET 10 integration impact.
  Provides: deprecation timeline, breaking-change checklist, migration scripts (AzureAD to Microsoft.Graph), and PSResourceGet upgrade steps.
---

# PowerShell 2025 Breaking Changes & Migrations

Critical changes, deprecations, and migration paths for PowerShell in 2025.

## PowerShell 2.0 Removal (August-September 2025)

### What's Removed

PowerShell 2.0 has been **completely removed** from:
- **Windows 11 version 24H2** (August 2025)
- **Windows Server 2025** (September 2025)

**Why:** Security improvements, reduced attack surface, legacy code cleanup

### Migration Path

```powershell
# Check if PowerShell 2.0 is installed
Get-WindowsOptionalFeature -Online -FeatureName MicrosoftWindowsPowerShellV2Root

# If you still need PowerShell 2.0 (NOT RECOMMENDED)
# - Use older Windows versions
# - Use Windows containers with older base images
# - Upgrade scripts to PowerShell 5.1 or 7+

# Recommended: Migrate to PowerShell 7.5+
winget install Microsoft.PowerShell
```

**Action Required:** Audit all scripts and remove `-Version 2.0` parameters from any PowerShell invocations.

---

## MSOnline & AzureAD Module Retirement

### Retirement Timeline

| Module | Stop Working | Retirement Complete |
|--------|--------------|---------------------|
| **MSOnline** | Late May 2025 | May 31, 2025 |
| **AzureAD** | March 30, 2025 | After July 1, 2025 |

**Critical:** These modules will stop functioning - not just deprecated, but **completely non-functional**.

### Migration Path

**From MSOnline/AzureAD to Microsoft.Graph:**

```powershell
# OLD (MSOnline) - STOPS WORKING MAY 2025
Connect-MsolService
Get-MsolUser
Set-MsolUser -UserPrincipalName "[email protected]" -UsageLocation "US"

# NEW (Microsoft.Graph 2.32.0)
Connect-MgGraph -Scopes "User.ReadWrite.All"
Get-MgUser
Update-MgUser -UserId "[email protected]" -UsageLocation "US"

# OLD (AzureAD) - STOPS WORKING MARCH 2025
Connect-AzureAD
Get-AzureADUser
New-AzureADUser -DisplayName "John Doe" -UserPrincipalName "[email protected]"

# NEW (Microsoft.Graph 2.32.0)
Connect-MgGraph -Scopes "User.ReadWrite.All"
Get-MgUser
New-MgUser -DisplayName "John Doe" -UserPrincipalName "[email protected]"
```

**Alternative:** Use Microsoft Entra PowerShell module (successor to AzureAD)

```powershell
Install-Module -Name Microsoft.Graph.Entra -Scope CurrentUser
Connect-Entra
Get-EntraUser
```

### Common Command Mappings

| MSOnline/AzureAD | Microsoft.Graph | Notes |
|------------------|----------------|-------|
| `Get-MsolUser` / `Get-AzureADUser` | `Get-MgUser` | Requires User.Read.All scope |
| `Get-MsolGroup` / `Get-AzureADGroup` | `Get-MgGroup` | Requires Group.Read.All scope |
| `Get-MsolDevice` / `Get-AzureADDevice` | `Get-MgDevice` | Requires Device.Read.All scope |
| `Connect-MsolService` / `Connect-AzureAD` | `Connect-MgGraph` | Scope-based permissions |

---

## WMIC Removal (Windows 11 25H2)

### What's Removed

**Windows Management Instrumentation Command-line (WMIC)** tool removed after upgrading to Windows 11 25H2+.

### Migration Path

**From WMIC to PowerShell WMI/CIM:**

```powershell
# OLD (WMIC) - REMOVED
wmic process list brief
wmic os get caption

# NEW (PowerShell CIM)
Get-CimInstance -ClassName Win32_Process | Select-Object Name, ProcessId, CommandLine
Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object Caption, Version

# For detailed process info
Get-Process | Format-Table Name, Id, CPU, WorkingSet -AutoSize

# For system info
Get-ComputerInfo | Select-Object WindowsProductName, WindowsVersion
```

---

## PowerShellGet → PSResourceGet Migration

### Modern Package Management (2025)

**PSResourceGet** is the official successor to PowerShellGet (2x faster, actively developed).

```powershell
# Install PSResourceGet (ships with PowerShell 7.4+)
Install-Module -Name Microsoft.PowerShell.PSResourceGet -Force

# New commands (PSResourceGet)
Install-PSResource -Name Az -Scope CurrentUser  # Replaces Install-Module
Find-PSResource -Name "*Azure*"                 # Replaces Find-Module
Update-PSResource -Name Az                      # Replaces Update-Module
Get-InstalledPSResource                         # Replaces Get-InstalledModule

# Compatibility layer available for legacy scripts
# Your old Install-Module commands still work but call PSResourceGet internally
```

**Performance Comparison:**
- **PowerShellGet**: 10-15 seconds to install module
- **PSResourceGet**: 5-7 seconds to install module (2x faster)

---

## Test-Json Schema Changes

### Breaking Change (PowerShell 7.4+)

**Test-Json** now uses **JsonSchema.NET** instead of **Newtonsoft.Json.Schema**.

**Impact:** No longer supports Draft 4 JSON schemas.

```powershell
# OLD (Draft 4 schema) - NO LONGER SUPPORTED
$schema = @"
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object"
}
"@

Test-Json -Json $json -Schema $schema  # FAILS in PowerShell 7.4+

# NEW (Draft 6+ schema) - SUPPORTED
$schema = @"
{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "type": "object"
}
"@

Test-Json -Json $json -Schema $schema  # WORKS
```

---

## #Requires -PSSnapin Removed

### Breaking Change (PowerShell 7.4+)

All code related to `#Requires -PSSnapin` has been removed.

```powershell
# OLD (PowerShell 5.1 and earlier)
#Requires -PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn

# NEW (Use modules instead)
#Requires -Modules ExchangeOnlineManagement

Import-Module ExchangeOnlineManagement
Connect-ExchangeOnline
```

---

## Security Hardening (2025 Standards)

### Just Enough Administration (JEA)

**JEA** is now a security requirement for production environments:

```powershell
# Create JEA session configuration
New-PSSessionConfigurationFile -SessionType RestrictedRemoteServer `
    -Path "C:\JEA\RestrictedAdmin.pssc" `
    -VisibleCmdlets @{
        Name = 'Restart-Service'
        Parameters = @{ Name = 'Name'; ValidateSet = 'Spooler' }
    } `
    -LanguageMode NoLanguage

# Register JEA endpoint
Register-PSSessionConfiguration -Name RestrictedAdmin `
    -Path "C:\JEA\RestrictedAdmin.pssc" `
    -Force

# Connect with limited privileges
Enter-PSSession -ComputerName Server01 -ConfigurationName RestrictedAdmin
```

### Windows Defender Application Control (WDAC)

**WDAC** replaces AppLocker for PowerShell script control:

```powershell
# Create WDAC policy for PowerShell scripts
New-CIPolicy -FilePath "C:\WDAC\PowerShellPolicy.xml" `
    -ScanPath "C:\Scripts" `
    -Level FilePublisher `
    -Fallback Hash

# Convert to binary and deploy
ConvertFrom-CIPolicy -XmlFilePath "C:\WDAC\PowerShellPolicy.xml" `
    -BinaryFilePath "C:\Windows\System32\CodeIntegrity\SIPolicy.p7b"
```

### Constrained Language Mode

**Constrained Language Mode** is now recommended for all users without admin privileges:

```powershell
# Check current language mode
$ExecutionContext.SessionState.LanguageMode
# Output: FullLanguage (admin) or ConstrainedLanguage (standard user)

# Set system-wide constrained language mode via Group Policy or Environment Variable
# Set HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\__PSLockdownPolicy = 4
```

---

## PowerShell 7.6 Preview Features

### Current Status (October 2025)

PowerShell 7.6.0 Preview 5 available (built on .NET 9.0.101)

**New Features:**
- **PSRedirectToVariable**: Allow redirecting to a variable
- **Module Rename**: ThreadJob → Microsoft.PowerShell.ThreadJob
- **PSResourceGet 1.1.0**: Improved performance and Azure Artifacts support

```powershell
# Check PowerShell version
$PSVersionTable.PSVersion
# 7.5.4 (stable) or 7.6.0-preview.5

# .NET version
[System.Runtime.InteropServices.RuntimeInformation]::FrameworkDescription
# .NET 9.0.101
```

---

## Migration Checklist

### Immediate Actions Required (2025)

- [ ] **Audit MSOnline/AzureAD usage** - Migrate to Microsoft.Graph 2.32.0 before May 2025
- [ ] **Remove PowerShell 2.0 references** - Upgrade to PowerShell 7.5+
- [ ] **Replace WMIC commands** - Use Get-CimInstance/Get-Process
- [ ] **Update JSON schemas** - Migrate Draft 4 to Draft 6+
- [ ] **Remove PSSnapin requirements** - Convert to modules
- [ ] **Adopt PSResourceGet** - Faster, modern package management
- [ ] **Implement JEA** - Role-based access control for production
- [ ] **Enable WDAC** - Application control for PowerShell scripts
- [ ] **Test Constrained Language Mode** - For non-admin users

### Recommended Actions

- [ ] **Upgrade to PowerShell 7.5.4** - Latest stable with .NET 9
- [ ] **Adopt Az 14.5.0** - Latest Azure module with zone redundancy
- [ ] **Use Microsoft.Graph 2.32.0** - Actively maintained Graph SDK
- [ ] **Enable Script Block Logging** - Security auditing
- [ ] **Implement Code Signing** - For production scripts
- [ ] **Use Azure Key Vault** - For credential management

---

## Testing Migration

```powershell
# Test for deprecated module usage
Get-Module MSOnline, AzureAD -ListAvailable
# If found, plan migration immediately

# Test for PowerShell 2.0 dependencies
Get-Content "script.ps1" | Select-String -Pattern "powershell.exe -Version 2"
# If found, remove version parameter

# Test for WMIC usage
Get-ChildItem -Path "C:\Scripts" -Recurse -Filter "*.ps1" |
    Select-String -Pattern "wmic" |
    Select-Object Path, Line

# Verify PowerShell version compatibility
#Requires -Version 7.0
Test-Path $PSCommandPath  # Ensures script is PowerShell 7+
```

---

## Resources

- [PowerShell 7.5 Release Notes](https://learn.microsoft.com/en-us/powershell/scripting/whats-new/what-s-new-in-powershell-75)
- [MSOnline/AzureAD Retirement Info](https://techcommunity.microsoft.com/blog/microsoft-entra-blog/action-required-msonline-and-azuread-powershell-retirement---2025-info-and-resou/4364991)
- [PSResourceGet Documentation](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.psresourceget)
- [JEA Documentation](https://learn.microsoft.com/en-us/powershell/scripting/security/remoting/jea/overview)
- [WDAC Documentation](https://learn.microsoft.com/en-us/windows/security/application-security/application-control/windows-defender-application-control)

---

**Last Updated:** October 2025

© JosiahSiegel · MIT · JosiahSiegel/claude-plugin-marketplace

Similar skills

All skills for DevOps and infrastructure →

From the same set96

The whole set →
ado-pipeline-best-practices ado-pipeline-best-practices guides coding agents in designing, auditing, and optimizing Azure DevOps YAML pipelines using enterprise patterns. CX Codex +1 182installs parallel-processing-patterns The parallel-processing-patterns skill covers parallel Bash jobs with GNU Parallel, xargs -P, and background processes. Use it to process files concurrently or cap the number of running tasks. CX Codex +1 181installs compose-patterns-2025 The compose-patterns-2025 skill guides Docker Compose setups for multiple environments, service health checks, and network separation. Use it when shaping production Compose files. CX Codex +1 179installs ffmpeg-transitions-effects ffmpeg-transitions-effects is a Claude Code skill for building video transitions with FFmpeg. It activates for clip sequences, slideshows, fades, and synced audio crossfades. CX Codex +1 176installs azure-well-architected-framework azure-well-architected-framework reviews Azure cloud architectures against the Well-Architected Framework pillars using proven Azure CLI templates. CX Codex +1 174installs windows-git-bash-paths The windows-git-bash-paths skill helps handle Windows paths in Git Bash when working with SSDT, SqlPackage, and DACPAC files. Use it when Git Bash rewrites command arguments and SqlPackage receives the wrong path. CX Codex +1 173installs index-strategies index-strategies is a Claude Code skill that designs, reviews, and tunes SQL Server indexes, from clustered and nonclustered to filtered and columnstore. CX Codex +1 172installs databricks-2025 ADF and Databricks 2025 integration patterns, linked service templates, and updated connector recipes. CX Codex +1 168installs

Project sponsors

Companies that keep this analytics open