【问题标题】:Powershell commands fails in SharePoint serverSharePoint 服务器中的 Powershell 命令失败
【发布时间】:2015-10-23 00:12:55
【问题描述】:

我在 SharePoint 2013 场中有两个 WFE。在我的一台服务器上,我为日常活动安排了带有任务调度程序的 powershell 脚本。

上周服务器为最新补丁进行了修补。修补后我发现我的服务器不再运行脚本并抛出错误:

Get-SPWeb : Cannot find an SPSite object that contains the following Id or Url: http:///<SiteUrl>.

但是我的第二个 WFE 仍然能够运行相同的脚本。

【问题讨论】:

    标签: powershell sharepoint


    【解决方案1】:

    在有问题的 WFE 中重新运行 Sharepoint 产品配置向导可能会解决问题。

    【讨论】:

    • 我运行了一次产品配置向导。但它失败了
    【解决方案2】:

    (代表 OP 发布).

    我在我的 WFE 上运行了这个脚本,问题得到解决 :)

    $h = Get-SPServiceHostconfig
    
    $h.Provision()
    
    $services = Get-SPServiceApplication
    
    foreach ($service in $services) { $service.provision();
    write-host $service.name}
    

    【讨论】:

      猜你喜欢
      • 2014-12-31
      • 2023-03-18
      • 2014-11-09
      • 1970-01-01
      • 1970-01-01
      • 2011-10-02
      • 1970-01-01
      • 2017-07-30
      • 2013-01-12
      相关资源
      最近更新 更多