探索 PowerShell 7 与 Windows PowerShell 的兼容性
1. PowerShell 7 中使用 Windows PowerShell 模块的操作步骤
在 PowerShell 7 中使用 Windows PowerShell 模块时,我们可以按照以下步骤进行操作:
1. 显式导入模块 :
Import-Module -Name ServerManager
- 发现模块内的命令 :
Get-Module -Name ServerManager | Format-List
- 使用 ServerManager 模块中的命令 :
Get-WindowsFeature -Name TFTP-Client
- 在远程会话中运行命令 :
$Session = Get-PSSession -Name WinPSCompatSession
Invoke-
超级会员免费看
订阅专栏 解锁全文
2425

被折叠的 条评论
为什么被折叠?



