powershell-2025-changes
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.
What this skill does
# 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 ma
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.