【问题标题】:Import-DscResource with relative paths具有相对路径的 Import-DscResource
【发布时间】:2017-09-26 09:05:17
【问题描述】:

我是 powershell 的新手,因为有一天我正在寻找一种解决方案,以从相对路径导入 powershell 中的 dscresources。我不希望执行文件的每个人都需要在 powershell 模块文件夹中拥有模块。

而不是

Import-DscResource -Name Test

类似的东西

Import-DscResource -Name Test -Path "../Modules/Test"

谁能帮帮我?

谢谢:)

【问题讨论】:

    标签: powershell import dsc


    【解决方案1】:

    通过路径导入 DscResource 不起作用。您可以将模块放在 Program Files\WindowsPowerShell\Modules 下,并在 -Module 参数中指定模块名称

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-01-18
      • 1970-01-01
      • 2018-06-27
      • 1970-01-01
      • 2017-02-17
      • 2021-08-07
      • 1970-01-01
      • 2022-09-27
      相关资源
      最近更新 更多