Powershell SDK 3

本文关键字:SDK Powershell | 更新日期: 2023-09-27 18:31:13

Powershell 3 SDK功能在Windows XP,Vista和7下工作而无需用户安装Powershell 3的正确方法是什么?

汇编:系统.管理.自动化.dll

本质上,此命令必须在Windows上运行,而无需安装Powershell 3.0:

Import-Module NetConnection
Get-NetConnectionProfile | ForEach-Object {Set-NetConnectionProfile  -InterfaceIndex $_.InterfaceIndex -NetworkCategory Private}

Powershell SDK 3

有问题的模块.. 即 NetConnection不是Powershell SDK的一部分。它是Windows Server 2012/8本身的一部分。请参阅 - http://technet.microsoft.com/en-us/library/dn264983(v=wps.620).aspx

关键是,即使您在这些较旧的操作系统上单独安装了Powershell V3,它也无济于事。有问题的模块很可能依赖于其他一些核心窗口组件本身。(例如 - 它是位于 root/StandardCimv2/MSFT_NetConnectionProfile 的 WMI 类的包装器)