【问题标题】:Get-PnPProvisioningTemplate is not recognized as the name of a cmdletGet-PnPProvisioningTemplate 未被识别为 cmdlet 的名称
【发布时间】:2021-05-27 00:29:57
【问题描述】:

我正在学习 SharePoint,尤其是使用 PowerShell 进行配置。我不能将 cmdlet 用作 Get-PnPProvisioningTemplate 或 Apply-PnPProvisioningTemplate,当执行它们时 PS 返回不是 cmdlet。我不知道我是否需要安装一些东西。

【问题讨论】:

    标签: powershell sharepoint cmdlets


    【解决方案1】:

    @费利佩,

    这些 cmdlet 存在于旧版 PnP 中,但被当前 PnP 中的新 cmdlet 替换。

    而新对应的cmdlet为:

    更多参考:

    BR

    【讨论】:

    • 非常感谢。使用新的 cmdlet 一切正常。
    【解决方案2】:

    您需要遵循将您链接到安装指南 (https://pnp.github.io/powershell/articles/installation.html) 的 PnP.Powershell 文档 (https://github.com/pnp/powershell)

    基本上你需要从 powershell 控制台运行Install-Module -Name "PnP.PowerShell"

    【讨论】:

    • 我已经安装了 PnP.PowerShell 模块。如果我列出所有 cmdlet(get-command -CommandType Cmdlet)找不到 Get-PnPProvisioningTemplate 或 Apply-PnPProvisioningTemplate
    • 安装时,您是否在管理员模式下使用 PowerShell?
    猜你喜欢
    • 1970-01-01
    • 2020-06-06
    • 1970-01-01
    • 2017-03-26
    • 2022-01-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多