Powershell Remoting: using imported module cmdlets in a remote pssession

前端 未结 7 2102
我在风中等你
我在风中等你 2021-02-05 12:34

Is there a way to use modules that were imported in a local session in a remote session? I looked at import-pssession, but I don\'t know how to get the local session. Here\'s a

7条回答
  •  隐瞒了意图╮
    2021-02-05 12:50

    in case this helps:

    if you can switch to PowerShell 3.0, then the Get-Module and Import-Module cmdlets support modules on remote computers:

    http://technet.microsoft.com/en-us/library/hh857339.aspx#BKMK_REM

    It should be possible to run PowerShell on remote computer, that performs Import-Module, without having any ps1 scripts on the remote computer.

提交回复
热议问题