- PowerShell Core 6.1 中的新增内容What's New in PowerShell Core 6.1
- 本文内容
- .NET Core 2.1.NET Core 2.1
- .NET Core 的 Windows 兼容包Windows Compatibility Pack for .NET Core
- 对应用程序允许列表的支持Support for Application Whitelisting
- 性能改进Performance improvements
- 在 Windows 上检查 system32 以获取兼容的内置模块Check system32 for compatible in-box modules on Windows
- Markdown cmdlet 和呈现Markdown cmdlets and rendering
- 实验性功能标志Experimental feature flags
- Web cmdlet 的改进Web cmdlet improvements
- 远程处理的改进Remoting improvements
- 用于在 Windows 上添加资源管理器 shell 上下文菜单的 MSI 选项MSI option to add explorer shell context menu on Windows
- 超值服务Goodies
- 1. foo
- Where-Object -Not
- New-ModuleManifest 创建无 BOM 的 UTF-8 文档New-ModuleManifest creates a BOM-less UTF-8 document
- 从 PSMethod 到委托的转换Conversions from PSMethod to Delegate
- Measure-Object 中的标准偏差Standard deviation in Measure-Object
- GetPfxCertificate -Password
- 删除 more 函数Removal of the more function
- cd DriveName: 现在将用户返回到该驱动器中的当前工作目录cd DriveName: now returns users to the current working directory in that drive
- Windows PowerShell 类型加速器Windows PowerShell type accelerators
- 所有 -LiteralPath 参数的 -lp 别名-lp alias for all -LiteralPath parameters
- 重大更改Breaking Changes
- Windows 上基于 MSI 的安装路径MSI-based installation paths on Windows
- 只能使用环境变量禁用遥测Telemetry can only be disabled with an environment variable
- 在 Unix 平台上的 PowerShell 远程处理中禁用 HTTP 基本身份验证Disallowed Basic Auth over HTTP in PowerShell Remoting on Unix platforms
- 已在 Add-Type 中删除作为受支持语言的 VisualBasicRemoved VisualBasic as a supported language in Add-Type
- 已清理 CommandTypes.Workflow 和 WorkflowInfoCleaned 的使用Cleaned up uses of CommandTypes.Workflow and WorkflowInfoCleaned
- ```
- foo
- Where-Object -Not
- New-ModuleManifest 创建无 BOM 的 UTF-8 文档New-ModuleManifest creates a BOM-less UTF-8 document
- 从 PSMethod 到委托的转换Conversions from PSMethod to Delegate
- Measure-Object 中的标准偏差Standard deviation in Measure-Object
- GetPfxCertificate -Password
- 删除 more 函数Removal of the more function
- cd DriveName: 现在将用户返回到该驱动器中的当前工作目录cd DriveName: now returns users to the current working directory in that drive
- Windows PowerShell 类型加速器Windows PowerShell type accelerators
- 所有 -LiteralPath 参数的 -lp 别名-lp alias for all -LiteralPath parameters ```
- `重大更改Breaking Changes
- Windows 上基于 MSI 的安装路径MSI-based installation paths on Windows
- 只能使用环境变量禁用遥测Telemetry can only be disabled with an environment variable
- 在 Unix 平台上的 PowerShell 远程处理中禁用 HTTP 基本身份验证Disallowed Basic Auth over HTTP in PowerShell Remoting on Unix platforms
- 已在 Add-Type 中删除作为受支持语言的 VisualBasicRemoved VisualBasic as a supported language in Add-Type
- 已清理 CommandTypes.Workflow 和 WorkflowInfoCleaned 的使用Cleaned up uses of CommandTypes.Workflow and WorkflowInfoCleaned`
PowerShell Core 6.1 中的新增内容What's New in PowerShell Core 6.1
本文内容
以下是 PowerShell Core 6.1 中引入的一系列新功能和更改。
此外还有使 PowerShell 更快更稳定的“无数”“无聊的东西”(以及很多 bug 修复)!若要获取更改的完整列表,请查看我们 GitHub 上的更改日志。
尽管我们在下面公布了一些名字,但是同样感谢实现此版本的所有社区参与者。
.NET Core 2.1.NET Core 2.1
在于 5 月发布后,PowerShell Core 6.1 已移动至 .NET Core 2.1,从而对 PowerShell 进行了很多改进,其中包括:
- 性能改进(参见下方)
- Alpine Linux 支持(预览版)
- .NET 全局工具支持 - 即将在 PowerShell 中推出
Span<T>
.NET Core 的 Windows 兼容包Windows Compatibility Pack for .NET Core
在 Windows 上,.NET 团队发布了 .NET Core 的 Windows 兼容包,这是一组程序集,可将大量已删除的 API 重新添加至 Windows 上的 .NET Core。
我们已将 Windows 兼容包添加到 PowerShell Core 6.1 版本中,让使用这些 API 的任何模块或脚本都能处于可用状态。
Windows兼容包使 PowerShell Core 能使用 Windows 10 2018 年 10 月更新和 Windows Server 2019 附带的 1900 多个 cmdlet。
对应用程序允许列表的支持Support for Application Whitelisting
PowerShell Core 6.1 与支持 AppLocker 和 Device Guard 应用程序允许列表的 Windows PowerShell 5.1 具有奇偶一致性。根据应用程序允许列表,可使用 PowerShell 受限语言模式精确地控制允许执行的二进制文件。
性能改进Performance improvements
PowerShell Core 6.0 取得了一些显着的性能提升。PowerShell Core 6.1 持续提高部分操作的速度。
例如,Group-Object 的速度提高了 66%:
1. Measure-Command { 1..100000 | % {Get-Random -Minimum 1 -Maximum 10000} | Group-Object }
| Windows PowerShell 5.1 | PowerShell Core 6.0 | PowerShell Core 6.1 | |
|---|---|---|---|
| 时间 (秒) | 25.178 | 19.653 | 6.641 |
| 加快 (%) | N/A | 21.9% | 66.2% |
同样,像这样的排序方案提高了 15% 以上:
1. Measure-Command { 1..100000 | % {Get-Random -Minimum 1 -Maximum 10000} | Sort-Object }
| Windows PowerShell 5.1 | PowerShell Core 6.0 | PowerShell Core 6.1 | |
|---|---|---|---|
| 时间 (秒) | 12.170 | 8.493 | 7.08 |
| 加快 (%) | N/A | 30.2% | 16.6% |
在从 Windows PowerShell 回归后,Import-Csv 的速度也显著提升了。以下示例使用具有 26,616 行和 6 列的测试 CSV:
1. Measure-Command {$a = Import-Csv foo.csv}
| Windows PowerShell 5.1 | PowerShell Core 6.0 | PowerShell Core 6.1 | |
|---|---|---|---|
| 时间 (秒) | 0.441 | 1.069 | 0.268 |
| 加快 (%) | N/A | -142.4% | 74.9%(来自 WPS 的 39.2%) |
最后,使用 Windows PowerShell,从 JSON 到 PSObject 的转换速度提高了 50% 以上。以下示例使用大约 2MB 的测试 JSON 文件:
1. Measure-Command {Get-Content .\foo.json | ConvertFrom-Json}
| Windows PowerShell 5.1 | PowerShell Core 6.0 | PowerShell Core 6.1 | |
|---|---|---|---|
| 时间 (秒) | 0.259 | 0.577 | 0.125 |
| 加快 (%) | N/A | -122.8% | 78.3%(从 WPS 为 51.7%) |
在 Windows 上检查 system32 以获取兼容的内置模块Check system32 for compatible in-box modules on Windows
在 Windows 10 1809 更新和 Windows Server 2019 中,我们更新了许多内置 PowerShell 模块,将其标记为与 PowerShell Core 兼容。
当 PowerShell Core 6.1 启动时,它会自动将 $windir\System32 包含为 PSModulePath 环境变量的一部分。但是,如果模块 CompatiblePSEdition 被标记为与 Core 兼容,则它仅将模块公开给 Get-Module 和 Import-Module。
1. Get-Module -ListAvailable
备注
可能会看到不同的可用模块,具体取决于安装的角色和功能。
1. ...
2. Directory: C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
4. ModuleType Version Name PSEdition ExportedCommands
5. ---------- ------- ---- --------- ----------------
6. Manifest 2.0.1.0 Appx Core,Desk {Add-AppxPackage, Get-AppxPackage, Get-AppxPacka...
7. Manifest 1.0.0.0 BitLocker Core,Desk {Unlock-BitLocker, Suspend-BitLocker, Resume-Bit...
8. Manifest 1.0.0.0 DnsClient Core,Desk {Resolve-DnsName, Clear-DnsClientCache, Get-DnsC...
9. Manifest 1.0.0.0 HgsDiagnostics Core,Desk {New-HgsTraceTarget, Get-HgsTrace, Get-HgsTraceF...
10. Binary 2.0.0.0 Hyper-V Core,Desk {Add-VMAssignableDevice, Add-VMDvdDrive, Add-VMF...
11. Binary 1.1 Hyper-V Core,Desk {Add-VMDvdDrive, Add-VMFibreChannelHba, Add-VMHa...
12. Manifest 2.0.0.0 NetAdapter Core,Desk {Disable-NetAdapter, Disable-NetAdapterBinding, ...
13. Manifest 1.0.0.0 NetEventPacketCapture Core,Desk {New-NetEventSession, Remove-NetEventSession, Ge...
14. Manifest 2.0.0.0 NetLbfo Core,Desk {Add-NetLbfoTeamMember, Add-NetLbfoTeamNic, Get-...
15. Manifest 1.0.0.0 NetNat Core,Desk {Get-NetNat, Get-NetNatExternalAddress, Get-NetN...
16. Manifest 2.0.0.0 NetQos Core,Desk {Get-NetQosPolicy, Set-NetQosPolicy, Remove-NetQ...
17. Manifest 2.0.0.0 NetSecurity Core,Desk {Get-DAPolicyChange, New-NetIPsecAuthProposal, N...
18. Manifest 1.0.0.0 NetSwitchTeam Core,Desk {New-NetSwitchTeam, Remove-NetSwitchTeam, Get-Ne...
19. Manifest 1.0.0.0 NetWNV Core,Desk {Get-NetVirtualizationProviderAddress, Get-NetVi...
20. Manifest 2.0.0.0 TrustedPlatformModule Core,Desk {Get-Tpm, Initialize-Tpm, Clear-Tpm, Unblock-Tpm...
21. ...
可以替代此行为,使用 -SkipEditionCheck 开关参数显示所有模块。我们还在表输出中添加了 PSEdition 属性。
1. Get-Module Net* -ListAvailable -SkipEditionCheck
1. Directory: C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
3. ModuleType Version Name PSEdition ExportedCommands
4. ---------- ------- ---- --------- ----------------
5. Manifest 2.0.0.0 NetAdapter Core,Desk {Disable-NetAdapter, Disable-NetAdapterBinding, ...
6. Manifest 1.0.0.0 NetConnection Core,Desk {Get-NetConnectionProfile, Set-NetConnectionProf...
7. Manifest 1.0.0.0 NetDiagnostics Desk Get-NetView
8. Manifest 1.0.0.0 NetEventPacketCapture Core,Desk {New-NetEventSession, Remove-NetEventSession, Ge...
9. Manifest 2.0.0.0 NetLbfo Core,Desk {Add-NetLbfoTeamMember, Add-NetLbfoTeamNic, Get-...
10. Manifest 1.0.0.0 NetNat Core,Desk {Get-NetNat, Get-NetNatExternalAddress, Get-NetN...
11. Manifest 2.0.0.0 NetQos Core,Desk {Get-NetQosPolicy, Set-NetQosPolicy, Remove-NetQ...
12. Manifest 2.0.0.0 NetSecurity Core,Desk {Get-DAPolicyChange, New-NetIPsecAuthProposal, N...
13. Manifest 1.0.0.0 NetSwitchTeam Core,Desk {New-NetSwitchTeam, Remove-NetSwitchTeam, Get-Ne...
14. Manifest 1.0.0.0 NetTCPIP Core,Desk {Get-NetIPAddress, Get-NetIPInterface, Get-NetIP...
15. Manifest 1.0.0.0 NetWNV Core,Desk {Get-NetVirtualizationProviderAddress, Get-NetVi...
16. Manifest 1.0.0.0 NetworkConnectivityStatus Core,Desk {Get-DAConnectionStatus, Get-NCSIPolicyConfigura...
17. Manifest 1.0.0.0 NetworkSwitchManager Core,Desk {Disable-NetworkSwitchEthernetPort, Enable-Netwo...
18. Manifest 1.0.0.0 NetworkTransition Core,Desk {Add-NetIPHttpsCertBinding, Disable-NetDnsTransi...
有关此行为的更多信息,请查看 PowerShell RFC0025。
Markdown cmdlet 和呈现Markdown cmdlets and rendering
Markdown 是创建可读明文文档的标准,其基本格式可以呈现为 HTML。
我们在 6.1 中添加了一些 cmdlet,允许在控制台中转换和呈现 Markdown 文档,包括:
ConvertFrom-MarkdownGet-MarkdownOptionSet-MarkdownOptionShow-Markdown例如,Show-Markdown在控制台中呈现 Markdown 文件:

若要详细了解这些 cmdlet 的工作方式,请查看此 RFC。
实验性功能标志Experimental feature flags
实验性功能标志使用户可以打开尚未最终确定的功能。这些实验性功能不受支持,可能存在 bug。
可以在 PowerShell RFC0029 中了解有关此功能的更多信息。
Web cmdlet 的改进Web cmdlet improvements
感谢 @markekraus ,我们对 Web cmdlet 进行了一系列改进:Invoke-WebRequest和 Invoke-RestMethod。
- PR #6109 - 对于
application-json响应,默认编码设置为 UTF-8 - PR #6018 -
-SkipHeaderValidation参数允许不符合标准的Content-Type标头 - PR #5972 -
Form参数支持简化的multipart/form-data支持 - PR #6338 - 合规且不区分大小写的关系键处理
- PR #6447 -添加 Web cmdlet 的
-Resume参数
远程处理的改进Remoting improvements
适用于容器的 PowerShell Direct 尝试先使用 PowerShell CorePowerShell Direct for Containers tries to use PowerShell Core first
PowerShell Direct 是 PowerShell 和 Hyper-V 的一项功能,允许在没有网络连接或其他远程管理服务的情况下连接到 Hyper-V VM 或容器。
在过去,PowerShell Direct 使用容器上的收件箱 Windows PowerShell 实例进行连接。现在,PowerShell Direct 先尝试使用 PATH 环境变量上任何可用的 pwsh.exe 进行连接。如果 pwsh.exe 不可用,PowerShell Direct 则会回退为使用 powershell.exe。
Enable-PSRemoting 现在为预览版本创建单独的远程处理终结点Enable-PSRemoting now creates separate remoting endpoints for preview versions
Enable-PSRemoting 现在创建两个远程会话配置:
- 一个用于 PowerShell 的主要版本。例如,
PowerShell.6。根据“系统范围”的 PowerShell 6 会话配置,次要版本更新可依赖于此终结点 - 一个版本特定的会话配置,例如:
PowerShell.6.1.0如果要在同一台计算机上安装并访问多个 PowerShell 6 版本,则此行为会很有帮助。
此外,预览版本的 PowerShell 现在可以在运行 Enable-PSRemoting cmdlet 后获取自己的远程会话配置:
1. C:\WINDOWS\system32> Enable-PSRemoting
如果之前未设置 WinRM,则输出可能会有所不同。
1. WinRM is already set up to receive requests on this computer.
2. WinRM is already set up for remote management on this computer.
然后可以查看 PowerShell 6 的预览版和稳定版本以及每个特定版本单独的 PowerShell 会话配置。
1. Get-PSSessionConfiguration
1. Name : PowerShell.6.2-preview.1
2. PSVersion : 6.2
3. StartupScript :
4. RunAsUser :
5. Permission : NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Administrators AccessAllowed, BUILTIN\Remote Management Users AccessAllowed
7. Name : PowerShell.6-preview
8. PSVersion : 6.2
9. StartupScript :
10. RunAsUser :
11. Permission : NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Administrators AccessAllowed, BUILTIN\Remote Management Users AccessAllowed
13. Name : powershell.6
14. PSVersion : 6.1
15. StartupScript :
16. RunAsUser :
17. Permission : NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Administrators AccessAllowed, BUILTIN\Remote Management Users AccessAllowed
19. Name : powershell.6.1.0
20. PSVersion : 6.1
21. StartupScript :
22. RunAsUser :
23. Permission : NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Administrators AccessAllowed, BUILTIN\Remote Management Users AccessAllowed
SSH 支持的 user@host:port 语法user@host:port syntax supported for SSH
SSH 客户端通常支持格式为 user@host:port 的连接字符串。我们通过将 SSH 添加为 PowerShell 远程处理的协议,增加了对这种连接字符串格式的支持:
Enter-PSSession -HostName fooUser@ssh.contoso.com:2222
用于在 Windows 上添加资源管理器 shell 上下文菜单的 MSI 选项MSI option to add explorer shell context menu on Windows
感谢 @bergmeister 的帮助,现在可以在 Windows 上启用上下文菜单。现在,可以从 Windows 资源管理器中的任何文件夹打开系统范围的 PowerShell 6.1 安装:

超值服务Goodies
Windows 快捷方式跳转列表中的“以管理员身份运行”"Run as Administrator" in the Windows shortcut jump list
感谢 @bergmeister 的帮助,PowerShell Core 快捷方式的跳转列表现已包含“以管理员身份运行”:

cd - 返回到上一目录cd - returns to previous directory
1. C:\Windows\System32> cd C:\
2. C:\> cd -
3. C:\Windows\System32>
或者,在 Linux 上:
1. PS /etc> cd /usr/bin
2. PS /usr/bin> cd -
3. PS /etc>
cd 和 cd — 也更改为 $HOME。
Test-Connection
感谢 @iSazonov 的帮助,Test-Connection cmdlet 已移植到 PowerShell Core。
Update-Help 更改为非管理员命令Update-Help as non-admin
根据大众需求,Update-Help 不再需要以管理员身份运行。Update-Help 现在默认将帮助保存到用户范围的文件夹。
PSCustomObject 上的新方法/属性New methods/properties on PSCustomObject
感谢 @iSazonov 的帮助,我们为 PSCustomObject 添加了新的方法和属性。PSCustomObject 现在包括类似于其他对象的 Count/Length 属性。
1. $PSCustomObject = [pscustomobject]@{foo = 1}
3. $PSCustomObject.Length
1. 1
1. $PSCustomObject.Count
1. 1
此工作还包括 ForEach 和 Where 方法,这些方法允许对 PSCustomObject 项进行操作和筛选:
1. $PSCustomObject.ForEach({$_.foo + 1})
1. 2
1. $PSCustomObject.Where({$_.foo -gt 0})
1. foo
1
Where-Object -Not
感谢 @SimonWahlin 的帮助,我们已将 -Not 参数添加到 Where-Object。现在可在管道中筛选对象,查看是否有不存在的属性或 null/空属性值。
例如,此命令返回未定义任何依赖服务的所有服务:
1. Get-Service | Where-Object -Not DependentServices
New-ModuleManifest 创建无 BOM 的 UTF-8 文档New-ModuleManifest creates a BOM-less UTF-8 document
由于我们在 PowerShell 6.0 中推出无 BOM 的 UTF-8,更新了 New-ModuleManifest cmdlet 以创建无 BOM 的 UTF-8 文档,而不是 UTF-16 文档。
从 PSMethod 到委托的转换Conversions from PSMethod to Delegate
感谢 @powercode 的帮助,我们现已支持将 PSMethod 转换为委托。这允许执行类似于将 PSMethod [M]::DoubleStrLen 作为委托值传递到 [M]::AggregateString 中的操作:
1. class M {
2. static [int] DoubleStrLen([string] $value) { return 2 * $value.Length }
4. static [long] AggregateString([string[]] $values, [func[string, int]] $selector) {
5. [long] $res = 0
6. foreach($s in $values){
7. $res += $selector.Invoke($s)
8. }
9. return $res
10. }
11. }
13. [M]::AggregateString((gci).Name, [M]::DoubleStrLen)
有关此更改的详细信息,请参阅 PR #5287。
Measure-Object 中的标准偏差Standard deviation in Measure-Object
感谢 @CloudyDino 的帮助,我们已向 Measure-Object 添加了 StandardDeviation 属性:
1. Get-Process | Measure-Object -Property CPU -AllStats
1. Count : 308
2. Average : 31.3720576298701
3. Sum : 9662.59375
4. Maximum : 4416.046875
5. Minimum :
6. StandardDeviation : 264.389544720926
7. Property : CPU
GetPfxCertificate -Password
感谢 @maybe-hello-world 的帮助,Get-PfxCertificate 现已具备采用 SecureString 的 Password 参数。这允许以非交互方式使用它:
1. $certFile = '\\server\share\pwd-protected.pfx'
2. $certPass = Read-Host -AsSecureString -Prompt 'Enter the password for certificate: '
4. $certThumbPrint = (Get-PfxCertificate -FilePath $certFile -Password $certPass ).ThumbPrint
删除 more 函数Removal of the more function
在过去,PowerShell 在 Windows 上发布了一个名为 more 的函数,它包含 more.com。该函数现在已删除。
此外,help 函数已改为在 Windows 上使用 more.com,或在非 Windows 平台上使用 $env:PAGER 指定的系统默认页导航。
cd DriveName: 现在将用户返回到该驱动器中的当前工作目录cd DriveName: now returns users to the current working directory in that drive
以前使用 Set-Location 或 cd 返回到 PSDrive 会将用户发送到该驱动器的默认位置。
感谢 @mcbobke 的帮助,现在会将用户发送到该会话最后一个已知的当前工作目录。
Windows PowerShell 类型加速器Windows PowerShell type accelerators
我们已在 Windows PowerShell 中包括以下类型加速器,以便更轻松地处理它们对应的类型:
[adsi]:System.DirectoryServices.DirectoryEntry[adsisearcher]:System.DirectoryServices.DirectorySearcher[wmi]:System.Management.ManagementObject[wmiclass]:System.Management.ManagementClass[wmisearcher]:System.Management.ManagementObjectSearcher这些类型的加速器未包含在 PowerShell 6 中,但已添加到在 Windows 上运行的 PowerShell 6.1 中。
这些类型可用于轻松构建 AD 和 WMI 对象。
例如,可以使用 LDAP 进行查询:
1. [adsi]'LDAP://CN=FooUse,OU=People,DC=contoso,DC=com'
以下示例创建 Win32_OperatingSystem CIM 对象:
1. [wmi]"Win32_OperatingSystem=@"
1. SystemDirectory : C:\WINDOWS\system32
2. Organization : Contoso IT
3. BuildNumber : 18234
4. RegisteredUser : Contoso Corp.
5. SerialNumber : 12345-67890-ABCDE-F0123
6. Version : 10.0.18234
此示例返回 Win32_OperatingSystem 类的 ManagementClass 对象。
1. [wmiclass]"Win32_OperatingSystem"
1. NameSpace: ROOT\cimv2
3. Name Methods Properties
4. ---- ------- ----------
5. Win32_OperatingSystem {Reboot, Shutdown... {BootDevice, BuildNumber, BuildType, Caption...}
所有 -LiteralPath 参数的 -lp 别名-lp alias for all -LiteralPath parameters
感谢 @kvprasoon 的帮助,我们现在为所有具有 -LiteralPath 参数的内置 PowerShell cmdlet 提供了参数别名 -lp。
重大更改Breaking Changes
Windows 上基于 MSI 的安装路径MSI-based installation paths on Windows
在 Windows 上,MSI 包现在会安装到以下路径:
$env:ProgramFiles\PowerShell\6\用于稳定安装 6.x$env:ProgramFiles\PowerShell\6-preview\用于 6.x 的预览安装 此更改确保 Microsoft Update 可以更新/服务于 PowerShell Core。
有关详细信息,请查看 PowerShell RFC0026。
只能使用环境变量禁用遥测Telemetry can only be disabled with an environment variable
PowerShell Core 在启动时会向 Microsoft 发送基本的遥测数据。该数据包括 OS 名称、OS 版本和 PowerShell 版本。此数据帮助我们更好地了解使用 PowerShell 的环境,并能确定新功能和修复的优先级。
要选择退出此遥测,请将环境变量 POWERSHELL_TELEMETRY_OPTOUT 设置为 true、yes 或 1。我们不再支持删除文件 DELETE_ME_TO_DISABLE_CONSOLEHOST_TELEMETRY 以禁用遥测。
在 Unix 平台上的 PowerShell 远程处理中禁用 HTTP 基本身份验证Disallowed Basic Auth over HTTP in PowerShell Remoting on Unix platforms
为了防止使用未加密的流量,Unix 平台上的 PowerShell 远程处理现在需要使用 NTLM/Negotiate 或 HTTPS。
有关这些更改的详细信息,请查看问题 #6779。
已在 Add-Type 中删除作为受支持语言的 VisualBasicRemoved VisualBasic as a supported language in Add-Type
在过去,可以使用 Add-Type cmdlet 编译 Visual Basic 代码。Visual Basic 很少与 Add-Type 一起使用。我们已删除此功能以减小 PowerShell 的大小。
已清理 CommandTypes.Workflow 和 WorkflowInfoCleaned 的使用Cleaned up uses of CommandTypes.Workflow and WorkflowInfoCleaned
有关这些更改的详细信息,请查看 PR #6708。
