powershell - PowershellCore 连接到 Powershell 5.1 远程计算机?
问题描述
我想知道是否可以从仅安装了 Powershell 5.1 的主机上的 Powershell 6/7 主机启动远程会话(这样我可以访问一些无法迁移到 Powershell 6/7 的 Powershell 5.1 功能) ?
问候,
解决方案
例如,要在远程计算机上显式定位Windows PowerShell
-ConfigurationName Microsoft.Powershell
会话(版本最高为 v5.1),请使用with Invoke-Command
。
事实上,从 PowerShell 7.1 开始,这仍然是 PowerShell 远程命令所针对的默认版本,这反映在首选项变量$PSSessionConfigurationName
中。
有关更多信息,请参阅此帖子。
推荐阅读
- html - 将 JSON 数据与数组、TypeScript (Ionic 3) 结合
- shell - 与多搜索匹配后的 AWK 打印
- selenium - Selenium Webdriver-如何单击网页中的“登录”按钮
- java - java - 使用 IgniteFuture 进行单元测试
- javascript - 来自 localStorage url 的图像返回 [object ArrayBuffer]
- php - 对日期时间字段运行选择查询时出错
- angularjs - 我需要在单击按钮时调用 AngularJS 中组件的 HTML 中定义的脚本中的函数。我怎样才能做到这一点?
- android - 从服务上下文中使用 fileProvider
- delphi - DKLang 的 StoreList 和 Virtual treeview 的标题文本翻译
- google-bigquery - 元数据库中的大查询超时