Proposal Deprecate legacy OS command-line tools in favor of native PowerShell cmdlets target PS7- roadmap benefits and migration plan #28032
Replies: 2 comments 2 replies
|
It’s unclear how closed-source legacy utilities can be replaced by open-source cmdlets. Presumably, this would require an intermediary proxy layer to translate the task and receive the response—much like interacting with powershell.exe. |
|
rhubarb-geek-nz thank you for your insights. I understand from your comment that a deprecation of commandline tools would not be feasible for many reasons. So what would be left is a transition that PowerShell modules / commandlets would be provided to mirror the features of commandline tools, while it is good idea to keep these tools "as-is". this would be certainly a way that is less of breaking change, and would also satisfy the goal making PowerShell 7 the native solution. Your idea of using a modern language and standardized output for commandline tools, then using a wrapper for PowerShell which can actually handle the outputs and also invoke the commandline tool(s), seems a good middle ground. Thank you! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
While this dicussion is not entirely focused on the product itself and has dependencies to other teams, I appreciate if the discussion could be started here because other PMs / Teams have access and the community is more aware about this, instead of posting on Windows Server Insider techcommunity. Looking forward to a fruitful discussion and thriving ideas.
Labels
category: powershell-5-to-7-migration
area: platform; modules
type: proposal; discussion
impact: breaking-change
priority: medium
Summary
This proposal recommends a staged deprecation of legacy OS command-line utilities in favor of first-class, native PowerShell cmdlets and modules targeted at PowerShell 7 (PS7). The objective is to modernize the Windows management surface to deliver structured output, safer defaults, better automation, and cross-platform parity. This change requires coordination across PowerShell, Windows Server, Azure Local, Windows Client, and Devices teams and will accept and communicate breaking changes where they improve the platform.
Goals
Replace legacy CLIs with native PowerShell cmdlets that return objects, follow PowerShell conventions, and integrate with modern tooling.
Prerequisites
Benefits
See also: https://aka.ms/AA13iks3 - Feature request for Notepad / edit.exe
Emphases
Migration approach
Deprecation timeline: announce intent, mark deprecated, and remove only after adoption thresholds and sufficient notice (as usual) for Windows / Windows Server
Telemetry and metrics: track adoption, incidents, and performance to validate parity.
Risks and mitigations
Script breakage: mitigate with compatibility shims, analyzers, and a staged timeline.
Operational inertia: mitigate with strong documentation, migration tooling, and pilot success stories.
Recovery runtime availability: mitigate by shipping a lightweight PS7 runtime for WinRE and WinPE with curated modules.
Metrics for success
Call to action
PowerShell community: review mappings and API guidelines; prototype replacements; author migration examples and tests.
Checklist
[ ] Publish canonical mapping document legacy CLI → PS7 module/cmdlet.
[ ] Define API guidelines and output object schemas.
[ ] Implement PSScriptAnalyzer rules to flag deprecated CLI usage.
[ ] Build compatibility shim module exposing legacy names with deprecation warnings.
[ ] Pilot PS7 runtime in WinRE and WinPE with curated modules.
[ ] Run enterprise pilots and collect telemetry.
[ ] Publish migration guides and breaking-change notes.
[ ] Establish cross-team working group and regular sync cadence.
Proposed deprecation timeline
Phase 0 Planning 0–3 months
Inventory legacy CLIs and prioritize the first wave.
Draft API guidelines and parity checklists.
Phase 1 Prototype and Pilot 3–9 months
Implement PS7 replacements for 6–10 high-impact tools.
Pilot PS7 runtime in WinRE and WinPE images for recovery scenarios.
Publish migration guides and PSScriptAnalyzer rules.
Phase 2 Broad Rollout and Deprecation Notice 9–18 months
Announce deprecation for prioritized CLIs and ship compatibility shims.
Encourage adoption via documentation, tooling, and telemetry.
Continue expanding PS7 module coverage.
Phase 3 Optional Removal from Default Images 18–36 months
After adoption thresholds and enterprise validation, remove legacy binaries from new images; keep them available as optional packages for a defined period.
Continue support for compatibility packages for customers who need extended timelines.
Canonical mapping file canonical-mapping.md
markdown
Canonical mapping legacy CLI → PS7 replacement starter set
Example migration guidance snippet
Legacy: diskpart /s script.txt
PS7: Import-Module Storage; Invoke-PartitionScript -Path script.ps1
Notes:
Provide a script converter tool that translates common diskpart scripts into PowerShell equivalents; include validation and dry-run modes.
Suggested immediate next steps
Create the canonical mapping document in this repo and solicit community review.
Form a cross-team working group with PowerShell, Windows Server, Azure Local, Windows Client, and Devices.
Prototype PS7 modules for diskpart, diskspd, and bcdedit replacements and pilot PS7 in WinRE and WinPE.
Publish PSScriptAnalyzer rules and a compatibility shim module.
Announce deprecation intent and timeline to enterprise customers and partners.
Closing
This is a mid to long-term strategic effort that requires cross-team coordination, careful engineering, and clear communication. The payoff is a modern, consistent, and automatable Windows management surface that leverages PS7 strengths: objects, parallelism, cross-platform maturity, and modern tooling.
All reactions