繁体   English   中英

这个 win10 cmd 命令如何在 win7 上工作?

[英]How to this win10 cmd command work on win7?

我想让以下命令在 windows 7 上工作,但似乎在 windows 7 上无法识别 Add-VpnConnection

set server_addr="Your VPN Server IP (or DNS name)"
# Create VPN connection
powershell -command "Add-VpnConnection -Name 'My IKEv2 VPN' -ServerAddress '%server_addr%' -TunnelType IKEv2 -AuthenticationMethod MachineCertificate -EncryptionLevel Required -PassThru"
# Set IPsec configuration
powershell -command "Set-VpnConnectionIPsecConfiguration -ConnectionName 'My IKEv2 VPN' -AuthenticationTransformConstants GCMAES256 -CipherTransformConstants GCMAES256 -EncryptionMethod AES256 -IntegrityCheckMethod SHA256 -PfsGroup None -DHGroup Group14 -PassThru -Force"

在 windows 7 上无法识别Add-VpnConnection

Add-VpnConnection是 PowerShell 4.0 的一部分,它内置于 Windows 版本 8.1+

您需要在 Windows7 上安装它。

请参阅如何安装 Windows PowerShell 4.0 - TechNet 文章 - 美国(英语) - TechNet Wiki了解所需的文件,具体取决于您的 Windows 版本。

If you want to install the latest version of PowerShell (7.1.2) on Windows 7 see How to Install PowerShell 7.1 in Windows 7, Windows 8, and Windows 10 | 教程发布 v7.1.2 发布 PowerShell · PowerShell/PowerShell · GitHub

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM