0

怎么样!

我需要一个解决方案,我需要添加一个管理单元 - 但不能。

我正在尝试在我公司的共享点站点上运行流程

因此真正的错误:Get-SPSite: 'Get SPSite' is not recognized as the name of a cmdlet, function, script file,..

需要添加一个管理单元来解决这个问题(从示例 3 系统地工作:来自站点http://technet.microsoft.com/en-us/library/hh849705(v=wps.620).aspx

我被第四个命令卡住了(不确定选择或下载哪个 installutil?): It does not exist/ cannot find the installutil: ManagementCmdlets.dll - 有人知道在哪里下载吗?

我尝试了一个名为Microsoft.PowerShell.Commands.Management.dll的文件

the installation failed, and the rollback has been performed

Powershell代码如下(如果这可能有帮助):

PS C:\Users\Gisintern1.PPF> get-pssnapin -registered
PS C:\Users\Gisintern1.PPF> set-alias installutil $env:windir\Microsoft.NET\Framework\v2.0.50727\installutil.exe
PS C:\Users\Gisintern1.PPF> installutil C:\Dev\Management\ManagementCmdlets.dll
**Microsoft (R) .NET Framework Installation utility Version 2.0.50727.5420
Copyright (c) Microsoft Corporation.  All rights reserved.
Exception occurred while initializing the installation:
System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Dev\Management\ManagementCmdlets.dll' or one of its dependencies. 
The system cannot find the file specified..
4

1 回答 1

0

根据该站点,ManagementCmdlets.dll 似乎是一个虚构的管理单元,仅在示例中用于显示该过程的工作原理。

我自己没有尝试通过 PowerShell 管理 SharePoint,但我做了一些挖掘工作。从外观上看,Get-SPSite 管理单元是与 SharePoint 2010 一起安装的,我假设它也有一些其他版本。在安装 SharePoint 的同一台服务器上,我会尝试运行:

Add-PsSnapin Microsoft.SharePoint.PowerShell
Get-SPSite

或者(根据https://blogs.technet.com/b/heyscriptingguy/archive/2010/09/20/get-started-managing-sharepoint-2010-with-powershell-cmdlets.aspx)可能会有“SharePoint可以启动的“命令行管理程序”,它似乎会自动将正确的管理单元加载到其他正常的 PowerShell 环境中。

希望这两个想法之一可以帮助您。

于 2013-12-03T15:23:43.480 回答