本文列出了 PowerShell 的各种版本包含的模块和 cmdlet。 这是发行说明中信息的摘要。 如需了解更多详情,请参阅发行说明:
- PowerShell 7.5 中的新增功能
- PowerShell 7.4 中的新增功能
- PowerShell 7.3 中的新增功能
- PowerShell 7.2 中的新增功能
- PowerShell 7.1 中的新增功能
- PowerShell 7.0 中的新增功能
本文正在编写中。 请帮助我们不断更新此信息。
模块发行历史记录
ModuleName/PSVersion | 5.1 | 7.2 | 7.4 | 7.5 | 注意 |
---|---|---|---|---|---|
CimCmdlet | 仅限 Windows | ||||
ISE(在 2.0 中引入) | 仅限 Windows | ||||
Microsoft.PowerShell.Archive | |||||
Microsoft.PowerShell.Core | |||||
Microsoft.PowerShell.Diagnostics | 仅限 Windows | ||||
Microsoft.PowerShell.Host | |||||
Microsoft.PowerShell.LocalAccounts | 仅 Windows (仅限 64 位) | ||||
Microsoft.PowerShell.Management | |||||
Microsoft.PowerShell.ODataUtils | 仅限 Windows | ||||
Microsoft.PowerShell.Operation.Validation | 仅限 Windows | ||||
Microsoft.PowerShell.PSResourceGet | 库中可用的新版本 | ||||
Microsoft.PowerShell.Security | |||||
Microsoft.PowerShell.Utility | |||||
Microsoft.WsMan.Management | 仅限 Windows | ||||
PackageManagement | |||||
PowershellGet 1.1 | 必须升级到 v2.x | ||||
PowershellGet 2.x | 库中可用的新版本 | ||||
PSDesiredStateConfiguration 1.1 | 已从 7.2 中删除 - 在库中提供 | ||||
PSDesiredStateConfiguration 2.x | 已从 7.2 中删除 - 在库中提供 | ||||
PSDesiredStateConfiguration 3.x | 库中可用的预览版 | ||||
PSDiagnostics | 仅限 Windows | ||||
PSReadLine | v1.x | v2.1 | v2.3.4 | v2.3.4 | 库中可用的新版本 |
PSScheduledJob | 仅限 Windows | ||||
PSWorkflow | 仅限 Windows | ||||
PSWorkflowUtility | 仅限 Windows | ||||
ThreadJob | 可在 PowerShell 5.1 中安装 |
Cmdlet 发行历史记录
CimCmdlet
Cmdlet 名称 | 5.1 | 7.2 | 7.4 | 7.5 | 注意 |
---|---|---|---|---|---|
Export-BinaryMiLog | 仅限 Windows | ||||
Get-CimAssociatedInstance | 仅限 Windows | ||||
Get-CimClass | 仅限 Windows | ||||
Get-CimInstance | 仅限 Windows | ||||
Get-CimSession | 仅限 Windows | ||||
Import-BinaryMiLog | 仅限 Windows | ||||
Invoke-CimMethod | 仅限 Windows | ||||
New-CimInstance | 仅限 Windows | ||||
New-CimSession | 仅限 Windows | ||||
New-CimSessionOption | 仅限 Windows | ||||
Register-CimIndicationEvent | 仅限 Windows | ||||
Remove-CimInstance | 仅限 Windows | ||||
Remove-CimSession | 仅限 Windows | ||||
Set-CimInstance | 仅限 Windows |
ISE(在 2.0 中引入)
此模块仅在 Windows PowerShell 中可用。
Cmdlet 名称 | 5.1 | 注意 |
---|---|---|
Get-IseSnippet | ||
Import-IseSnippet | ||
New-IseSnippet |
Microsoft.PowerShell.Archive
Cmdlet 名称 | 5.1 | 7.2 | 7.4 | 7.5 | 注意 |
---|---|---|---|---|---|
Compress-Archive | |||||
Expand-Archive |
Microsoft.PowerShell.Core
Cmdlet 名称 | 5.1 | 7.2 | 7.4 | 7.5 | 注意 |
---|---|---|---|---|---|
Add-History | |||||
Add-PSSnapin | 仅限 Windows | ||||
Clear-History | |||||
Clear-Host | |||||
Connect-PSSession | 仅限 Windows | ||||
Debug-Job | |||||
Disable-ExperimentalFeature | 在 6.2 中添加 | ||||
Disable-PSRemoting | 仅限 Windows | ||||
Disable-PSSessionConfiguration | 仅限 Windows | ||||
Disconnect-PSSession | 仅限 Windows | ||||
Enable-ExperimentalFeature | 在 6.2 中添加 | ||||
Enable-PSRemoting | 仅限 Windows | ||||
Enable-PSSessionConfiguration | 仅限 Windows | ||||
Enter-PSHostProcess | 6\.2 中新增 Linux 支持 | ||||
Enter-PSSession | |||||
Exit-PSHostProcess | 6\.2 中新增 Linux 支持 | ||||
Exit-PSSession | |||||
Export-Console | 仅限 Windows | ||||
Export-ModuleMember | |||||
ForEach-Object | |||||
Get-Command | |||||
Get-ExperimentalFeature | 在 6.2 中添加 | ||||
Get-Help | |||||
Get-History | |||||
Get-Job | |||||
Get-Module | |||||
Get-PSHostProcessInfo | 6\.2 中新增 Linux 支持 | ||||
Get-PSSession | |||||
Get-PSSessionCapability | |||||
Get-PSSessionConfiguration | |||||
Get-PSSnapin | 仅限 Windows | ||||
Get-Verb | 已移至 Microsoft.PowerShell.Utility 6.0 以上版本 | ||||
Import-Module | |||||
Invoke-Command | |||||
Invoke-History | |||||
New-Module | |||||
New-ModuleManifest | |||||
New-PSRoleCapabilityFile | |||||
New-PSSession | |||||
New-PSSessionConfigurationFile | 7\.3 中新增 Linux 支持 | ||||
New-PSSessionOption | |||||
New-PSTransportOption | |||||
Out-Default | |||||
Out-Host | |||||
Out-Null | |||||
Receive-Job | |||||
Receive-PSSession | 仅限 Windows | ||||
Register-ArgumentCompleter | |||||
Register-PSSessionConfiguration | 仅限 Windows | ||||
Remove-Job | |||||
Remove-Module | |||||
Remove-PSSession | |||||
Remove-PSSnapin | 仅限 Windows | ||||
Resume-Job | |||||
Save-Help | |||||
Set-PSDebug | |||||
Set-PSSessionConfiguration | 仅限 Windows | ||||
Set-StrictMode | |||||
Start-Job | |||||
Stop-Job | |||||
Switch-Process | 仅限 Linux 和 macOS | ||||
Suspend-Job | 仅限 Windows | ||||
Test-ModuleManifest | |||||
Test-PSSessionConfigurationFile | 仅限 Windows | ||||
Unregister-PSSessionConfiguration | 仅限 Windows | ||||
Update-Help | |||||
Wait-Job | |||||
Where-Object |
Microsoft.PowerShell.Diagnostics
Cmdlet 名称 | 5.1 | 7.2 | 7.4 | 7.5 | 注意 |
---|---|---|---|---|---|
Export-Counter | 仅限 Windows | ||||
Get-Counter | 仅限 Windows | ||||
Get-WinEvent | 仅限 Windows | ||||
Import-Counter | 仅限 Windows | ||||
New-WinEvent | 仅限 Windows |
Microsoft.PowerShell.Host
Cmdlet 名称 | 5.1 | 7.2 | 7.4 | 7.5 | 注意 |
---|---|---|---|---|---|
Start-Transcript | |||||
Stop-Transcript |
Microsoft.PowerShell.LocalAccounts(仅限 64 位)
此模块仅在 Windows PowerShell 中可用。
Cmdlet 名称 | 5.1 | 注意 |
---|---|---|
Add-LocalGroupMember | ||
Disable-LocalUser | ||
Enable-LocalUser | ||
Get-LocalGroup | ||
Get-LocalGroupMember | ||
Get-LocalUser | ||
New-LocalGroup | ||
New-LocalUser | ||
Remove-LocalGroup | ||
Remove-LocalGroupMember | ||
Remove-LocalUser | ||
Rename-LocalGroup | ||
Rename-LocalUser | ||
Set-LocalGroup | ||
Set-LocalUser |
Microsoft.PowerShell.Management
Cmdlet 名称 | 5.1 | 7.2 | 7.4 | 7.5 | 注意 |
---|---|---|---|---|---|
Add-Computer | 仅限 Windows | ||||
Add-Content | |||||
Checkpoint-Computer | 仅限 Windows | ||||
Clear-Content | |||||
Clear-EventLog | 仅限 Windows | ||||
Clear-Item | |||||
Clear-ItemProperty | |||||
Clear-RecycleBin | 仅限 Windows | ||||
Complete-Transaction | 仅限 Windows | ||||
Convert-Path | |||||
Copy-Item | |||||
Copy-ItemProperty | |||||
Debug-Process | |||||
Disable-ComputerRestore | 仅限 Windows | ||||
Enable-ComputerRestore | 仅限 Windows | ||||
Get-ChildItem | |||||
Get-Clipboard | |||||
Get-ComputerInfo | 仅限 Windows | ||||
Get-ComputerRestorePoint | 仅限 Windows | ||||
Get-Content | |||||
Get-ControlPanelItem | 仅限 Windows | ||||
Get-EventLog | 仅限 Windows | ||||
Get-HotFix | 仅限 Windows | ||||
Get-Item | |||||
Get-ItemProperty | |||||
Get-ItemPropertyValue | |||||
Get-Location | |||||
Get-Process | |||||
Get-PSDrive | |||||
Get-PSProvider | |||||
Get-Service | 仅限 Windows | ||||
Get-TimeZone | 仅限 Windows | ||||
Get-Transaction | 仅限 Windows | ||||
Get-WmiObject | 仅限 Windows | ||||
Invoke-Item | |||||
Invoke-WmiMethod | 仅限 Windows | ||||
Join-Path | |||||
Limit-EventLog | 仅限 Windows | ||||
Move-Item | |||||
Move-ItemProperty | |||||
New-EventLog | 仅限 Windows | ||||
New-Item | |||||
New-ItemProperty | |||||
New-PSDrive | |||||
New-Service | 仅限 Windows | ||||
New-WebServiceProxy | 仅限 Windows | ||||
Pop-Location | |||||
Push-Location | |||||
Register-WmiEvent | 仅限 Windows | ||||
Remove-Computer | 仅限 Windows | ||||
Remove-EventLog | 仅限 Windows | ||||
Remove-Item | |||||
Remove-ItemProperty | |||||
Remove-PSDrive | |||||
Remove-Service | 仅限 Windows | ||||
Remove-WmiObject | 仅限 Windows | ||||
Rename-Computer | 仅限 Windows | ||||
Rename-Item | |||||
Rename-ItemProperty | |||||
Reset-ComputerMachinePassword | 仅限 Windows | ||||
Resolve-Path | |||||
Restart-Computer | 7\.1 中新增 Linux/macOS 支持 | ||||
Restart-Service | 仅限 Windows | ||||
Restore-Computer | 仅限 Windows | ||||
Resume-Service | 仅限 Windows | ||||
Set-Clipboard | |||||
Set-Content | |||||
Set-Item | |||||
Set-ItemProperty | |||||
Set-Location | |||||
Set-Service | 仅限 Windows | ||||
Set-TimeZone | 仅限 Windows | ||||
Set-WmiInstance | 仅限 Windows | ||||
Show-ControlPanelItem | 仅限 Windows | ||||
Show-EventLog | 仅限 Windows | ||||
Split-Path | |||||
Start-Process | |||||
Start-Service | 仅限 Windows | ||||
Start-Transaction | 仅限 Windows | ||||
Stop-Computer | 7\.1 中新增 Linux/macOS 支持 | ||||
Stop-Process | |||||
Stop-Service | 仅限 Windows | ||||
Suspend-Service | 仅限 Windows | ||||
Test-ComputerSecureChannel | 仅限 Windows | ||||
Test-Connection | |||||
Test-Path | |||||
Undo-Transaction | 仅限 Windows | ||||
Use-Transaction | 仅限 Windows | ||||
Wait-Process | |||||
Write-EventLog | 仅限 Windows |
Microsoft.PowerShell.ODataUtils
此模块仅在 Windows PowerShell 中可用。
Cmdlet 名称 | 5.1 | 注意 |
---|---|---|
Export-ODataEndpointProxy |
Microsoft.PowerShell.Operation.Validation
此模块仅在 Windows PowerShell 中可用。
Cmdlet 名称 | 5.1 | 注意 |
---|---|---|
Get-OperationValidation | ||
Invoke-OperationValidation |
Microsoft.PowerShell.PSResourceGet
Cmdlet 名称 | 7.4 | 7.5 | 注意 |
---|---|---|---|
Get-PSResource | |||
Import-PSGetRepository | |||
Find-PSResource | |||
Get-InstalledPSResource | |||
Get-PSResourceRepository | |||
Get-PSScriptFileInfo | |||
Install-PSResource | |||
New-PSScriptFileInfo | |||
Publish-PSResource | |||
Register-PSResourceRepository | |||
Save-PSResource | |||
Set-PSResourceRepository | |||
Test-PSScriptFileInfo | |||
Uninstall-PSResource | |||
Unregister-PSResourceRepository | |||
Update-PSModuleManifest | |||
Update-PSResource | |||
Update-PSScriptFileInfo |
Microsoft.PowerShell.Security
Cmdlet 名称 | 5.1 | 7.2 | 7.4 | 7.5 | 注意 |
---|---|---|---|---|---|
ConvertFrom-SecureString | |||||
ConvertTo-SecureString | |||||
Get-Acl | 仅限 Windows | ||||
Get-AuthenticodeSignature | 仅限 Windows | ||||
Get-CmsMessage | 在 7.1 中添加了对 Linux/macOS 的支持 | ||||
Get-Credential | |||||
Get-ExecutionPolicy | 在 Linux/macOS 上返回“无限制” | ||||
Get-PfxCertificate | |||||
New-FileCatalog | 仅限 Windows | ||||
Protect-CmsMessage | 在 7.1 中添加了对 Linux/macOS 的支持 | ||||
Set-Acl | 仅限 Windows | ||||
Set-AuthenticodeSignature | 仅限 Windows | ||||
Set-ExecutionPolicy | 在 Linux/macOS 上不执行任何操作 | ||||
Test-FileCatalog | 仅限 Windows | ||||
Unprotect-CmsMessage | 在 7.1 中添加了对 Linux/macOS 的支持 |
Microsoft.PowerShell.Utility
Cmdlet 名称 | 5.1 | 7.2 | 7.4 | 7.5 | 注意 |
---|---|---|---|---|---|
Add-Member | |||||
Add-Type | |||||
Clear-Variable | |||||
Compare-Object | |||||
ConvertFrom-Csv | |||||
ConvertFrom-Json | |||||
ConvertFrom-Markdown | 在 6.1 中添加 | ||||
ConvertFrom-SddlString | 仅限 Windows | ||||
ConvertFrom-String | |||||
ConvertFrom-StringData | |||||
Convert-String | |||||
ConvertTo-Csv | |||||
ConvertTo-Html | |||||
ConvertTo-Json | |||||
ConvertTo-Xml | |||||
Debug-Runspace | |||||
Disable-PSBreakpoint | |||||
Disable-RunspaceDebug | |||||
Enable-PSBreakpoint | |||||
Enable-RunspaceDebug | |||||
Export-Alias | |||||
Export-Clixml | |||||
Export-Csv | |||||
Export-FormatData | |||||
Export-PSSession | |||||
Format-Custom | |||||
Format-Hex | |||||
Format-List | |||||
Format-Table | |||||
Format-Wide | |||||
Get-Alias | |||||
Get-Culture | |||||
Get-Date | |||||
Get-Error | |||||
Get-Event | Linux/macOS 上没有可用的事件源 | ||||
Get-EventSubscriber | |||||
Get-FileHash | |||||
Get-FormatData | |||||
Get-Host | |||||
Get-MarkdownOption | 在 6.1 中添加 | ||||
Get-Member | |||||
Get-PSBreakpoint | |||||
Get-PSCallStack | |||||
Get-Random | |||||
Get-Runspace | |||||
Get-RunspaceDebug | |||||
Get-SecureRandom | 在 7.4 中添加 | ||||
Get-TraceSource | |||||
Get-TypeData | |||||
Get-UICulture | |||||
Get-Unique | |||||
Get-Uptime | |||||
Get-Variable | |||||
Get-Verb | 移动自 Microsoft.PowerShell.Core | ||||
Group-Object | |||||
Import-Alias | |||||
Import-Clixml | |||||
Import-Csv | |||||
Import-LocalizedData | |||||
Import-PowerShellDataFile | |||||
Import-PSSession | |||||
Invoke-Expression | |||||
Invoke-RestMethod | |||||
Invoke-WebRequest | |||||
Join-String | |||||
Measure-Command | |||||
Measure-Object | |||||
New-Alias | |||||
New-Event | Linux/macOS 上没有可用的事件源 | ||||
New-Guid | |||||
New-Object | |||||
New-TemporaryFile | |||||
New-TimeSpan | |||||
New-Variable | |||||
Out-File | |||||
Out-GridView | 仅限 Windows | ||||
Out-printer | 仅限 Windows | ||||
Out-String | |||||
Read-Host | |||||
Register-EngineEvent | Linux/macOS 上没有可用的事件源 | ||||
Register-ObjectEvent | |||||
Remove-Alias | |||||
Remove-Event | Linux/macOS 上没有可用的事件源 | ||||
Remove-PSBreakpoint | |||||
Remove-TypeData | |||||
Remove-Variable | |||||
Select-Object | |||||
Select-String | |||||
Select-Xml | |||||
Send-MailMessage | |||||
Set-Alias | |||||
Set-Date | |||||
Set-MarkdownOption | 在 6.1 中添加 | ||||
Set-PSBreakpoint | |||||
Set-TraceSource | |||||
Set-Variable | |||||
Show-Command | 仅限 Windows | ||||
Show-Markdown | 在 6.1 中添加 | ||||
Sort-Object | |||||
Start-Sleep | |||||
Tee-Object | |||||
Test-Json | |||||
Trace-Command | |||||
Unblock-File | 7\.0 中新增 macOS 支持 | ||||
Unregister-Event | Linux/macOS 上没有可用的事件源 | ||||
Update-FormatData | |||||
Update-List | |||||
Update-TypeData | |||||
Wait-Debugger | |||||
Wait-Event | |||||
Write-Debug | |||||
Write-Error | |||||
Write-Host | |||||
Write-Information | |||||
Write-Output | |||||
Write-Progress | |||||
Write-Verbose | |||||
Write-Warning |
Microsoft.WsMan.Management
Cmdlet 名称 | 5.1 | 7.2 | 7.4 | 7.5 | 注意 |
---|---|---|---|---|---|
Connect-WSMan | 仅限 Windows | ||||
Disable-WSManCredSSP | 仅限 Windows | ||||
Disconnect-WSMan | 仅限 Windows | ||||
Enable-WSManCredSSP | 仅限 Windows | ||||
Get-WSManCredSSP | 仅限 Windows | ||||
Get-WSManInstance | 仅限 Windows | ||||
Invoke-WSManAction | 仅限 Windows | ||||
New-WSManInstance | 仅限 Windows | ||||
New-WSManSessionOption | 仅限 Windows | ||||
Remove-WSManInstance | 仅限 Windows | ||||
Set-WSManInstance | 仅限 Windows | ||||
Set-WSManQuickConfig | 仅限 Windows | ||||
Test-WSMan | 仅限 Windows |
PackageManagement
Cmdlet 名称 | 5.1 | 7.2 | 7.4 | 7.4 | 7.5 | 注意 |
---|---|---|---|---|---|---|
Find-Package | ||||||
Find-PackageProvider | ||||||
Get-Package | ||||||
Get-PackageProvider | ||||||
Get-PackageSource | ||||||
Import-PackageProvider | ||||||
Install-Package | ||||||
Install-PackageProvider | ||||||
Register-PackageSource | ||||||
Save-Package | ||||||
Set-PackageSource | ||||||
Uninstall-Package | ||||||
Unregister-PackageSource |
PowershellGet 2.x
Cmdlet 名称 | 5.1 | 7.2 | 7.4 | 7.5 | 注意 |
---|---|---|---|---|---|
Find-Command | |||||
Find-DscResource | |||||
Find-Module | |||||
Find-RoleCapability | |||||
Find-Script | |||||
Get-CredsFromCredentialProvider | |||||
Get-InstalledModule | |||||
Get-InstalledScript | |||||
Get-PSRepository | |||||
Install-Module | |||||
Install-Script | |||||
New-ScriptFileInfo | |||||
Publish-Module | |||||
Publish-Script | |||||
Register-PSRepository | |||||
Save-Module | |||||
Save-Script | |||||
Set-PSRepository | |||||
Test-ScriptFileInfo | |||||
Uninstall-Module | |||||
Uninstall-Script | |||||
Unregister-PSRepository | |||||
Update-Module | |||||
Update-ModuleManifest | |||||
Update-Script | |||||
Update-ScriptFileInfo |
PSDesiredStateConfiguration v1.1
此模块仅在 Windows PowerShell 中提供。
Cmdlet 名称 | 5.1 | 注意 |
---|---|---|
配置 | ||
Disable-DscDebug | ||
Enable-DscDebug | ||
Get-DscConfiguration | ||
Get-DscConfigurationStatus | ||
Get-DscLocalConfigurationManager | ||
Get-DscResource | ||
Invoke-DscResource | ||
New-DSCCheckSum | ||
Publish-DscConfiguration | ||
Remove-DscConfigurationDocument | ||
Restore-DscConfiguration | ||
Set-DscLocalConfigurationManager | ||
Start-DscConfiguration | ||
Stop-DscConfiguration | ||
Test-DscConfiguration | ||
Update-DscConfiguration |
PSDesiredStateConfiguration v2.0.5
此模块仅在 PowerShell 库中提供。
Cmdlet 名称 | 2.0.5 | 注意 |
---|---|---|
配置 | ||
Get-DscResource | ||
Invoke-DscResource | 实验 | |
New-DSCCheckSum |
PSDesiredStateConfiguration v3.x - 预览版
此模块仅在 PowerShell 库中提供。
Cmdlet 名称 | 3.0(预览版) | 注意 |
---|---|---|
配置 | ||
ConvertTo-DscJsonSchema | ||
Get-DscResource | ||
Invoke-DscResource | ||
New-DscChecksum |
PSDiagnostics
Cmdlet 名称 | 5.1 | 7.2 | 7.4 | 7.5 | 注意 |
---|---|---|---|---|---|
Disable-PSTrace | 仅限 Windows | ||||
Disable-PSWSManCombinedTrace | 仅限 Windows | ||||
Disable-WSManTrace | 仅限 Windows | ||||
Enable-PSTrace | 仅限 Windows | ||||
Enable-PSWSManCombinedTrace | 仅限 Windows | ||||
Enable-WSManTrace | 仅限 Windows | ||||
Get-LogProperties | 仅限 Windows | ||||
Set-LogProperties | 仅限 Windows | ||||
Start-Trace | 仅限 Windows | ||||
Stop-Trace | 仅限 Windows |
PSReadLine
Cmdlet 名称 | 5.1 | 7.2 | 7.4 | 7.5 | 注意 |
---|---|---|---|---|---|
Get-PSReadLineKeyHandler | |||||
Get-PSReadLineOption | |||||
PSConsoleHostReadLine | |||||
Remove-PSReadLineKeyHandler | |||||
Set-PSReadLineKeyHandler | |||||
Set-PSReadLineOption |
PSScheduledJob
此模块仅在 Windows PowerShell 中可用。
Cmdlet 名称 | 5.1 | 注意 |
---|---|---|
Add-JobTrigger | ||
Disable-JobTrigger | ||
Disable-ScheduledJob | ||
Enable-JobTrigger | ||
Enable-ScheduledJob | ||
Get-JobTrigger | ||
Get-ScheduledJob | ||
Get-ScheduledJobOption | ||
New-JobTrigger | ||
New-ScheduledJobOption | ||
Register-ScheduledJob | ||
Remove-JobTrigger | ||
Set-JobTrigger | ||
Set-ScheduledJob | ||
Set-ScheduledJobOption | ||
Unregister-ScheduledJob |
PSWorkflow 和 PSWorkflowUtility
此模块仅在 Windows PowerShell 中可用。
Cmdlet 名称 | 5.1 | 注意 |
---|---|---|
New-PSWorkflowExecutionOption | ||
New-PSWorkflowSession | ||
Invoke-AsWorkflow |
ThreadJob
Cmdlet 名称 | 5.1 | 7.2 | 7.4 | 7.5 | 注意 |
---|---|---|---|---|---|
Start-ThreadJob | 可在 PowerShell 5.1 中安装 |