Windows PowerShell and PowerShell 7 compatibility
Microsoft's edit ·
Microsoft's commit message in MicrosoftDocs/PowerShell-Docs · commit ad49e03 · +38 −2 lines · also on GitHub
11
---
2
−ms.date: 05/16/2022
2
+ms.date: 10/28/2022
33
title: Differences between Windows PowerShell 5.1 and PowerShell 7.x
44
description: This article summarizes the differences and breaking changes from Windows PowerShell 5.1 and the current version of PowerShell that is based on .NET Core.
55
---
⋯ 200 unchanged lines
206206
- The `Out-GridView` cmdlet
207207
- The **ShowWindow** parameter of `Get-Help`
208208
209
+### Aliases not available on Linux or macOS
210
+
211
+The following table lists the aliases available for Windows that are not available on non-Windows
212
+platforms. These aliases are not available because the target cmdlet is not available or the alias
213
+conflicts with a native command on those platforms.
214
+
215
+| Alias | Cmdlet |
216
+| --------- | ---------------------- |
217
+| `ac` | `Add-Content` |
218
+| `cat` | `Get-Content` |
219
+| `clear` | `Clear-Host` |
220
+| `cnsn` | `Connect-PSSession` |
221
+| `compare` | `Compare-Object` |
222
+| `cp` | `Copy-Item` |
223
+| `cpp` | `Copy-ItemProperty` |
224
+| `diff` | `Compare-Object` |
225
+| `dnsn` | `Disconnect-PSSession` |
226
+| `gsv` | `Get-Service` |
227
+| `kill` | `Stop-Process` |
228
+| `ls` | `Get-ChildItem` |
229
+| `man` | `help` |
230
+| `mount` | `New-PSDrive` |
231
+| `mv` | `Move-Item` |
232
+| `ogv` | `Out-GridView` |
233
+| `ps` | `Get-Process` |
234
+| `rm` | `Remove-Item` |
235
+| `rmdir` | `Remove-Item` |
236
+| `sasv` | `Start-Service` |
237
+| `shcm` | `Show-Command` |
238
+| `sleep` | `Start-Sleep` |
239
+| `sort` | `Sort-Object` |
240
+| `spsv` | `Stop-Service` |
241
+| `start` | `Start-Process` |
242
+| `tee` | `Tee-Object` |
243
+| `write` | `Write-Output` |
244
+
209245
### PowerShell Desired State Configuration (DSC) changes
210246
211247
`Invoke-DscResource` was restored as an experimental feature in PowerShell 7.0.
⋯ 38 unchanged lines
250286
251287
For Windows, a new switch parameter **UseWindowsPowerShell** is added to `Import-Module`. This
252288
switch creates a proxy module in PowerShell 7 that uses a local Windows PowerShell process to
253
−implicitly run any cmdlets contained in that module. For more information, see
289
+implicitly run any cmdlets contained in that module. For more information, see
254290
[Import-Module][Import-Module].
255291
256292
For more information on which Microsoft modules work with PowerShell 7.0, see the
⋯ 937 unchanged lines
Microsoft's Markdown source from MicrosoftDocs/PowerShell-Docs, © Microsoft Corporation, under CC BY 4.0. Changed lines with up to 3 unchanged lines around each; ChangeIntel kept this copy 10 Oct 03:16 UTC. The commit date is when the source changed, which can be hours or days before Learn published it.