当前位置: 代码迷 >> SharePoint >> sharepoint 2007 怎么使用 PowerShell
  详细解决方案

sharepoint 2007 怎么使用 PowerShell

热度:412   发布时间:2016-05-02 06:55:38.0
sharepoint 2007 如何使用 PowerShell
本帖最后由 cww2010 于 2015-03-10 22:03:35 编辑
如题:如果在server2003中使用powershell。
像Get-PSFarm现在不能认别
------解决思路----------------------
是2007还是2003?
Bing
------解决思路----------------------
sharepoint 2007?   
安装完成 就可以了。 有什么提示?
------解决思路----------------------
SharePoint 2007 不支持powershell命令,powershell命令是2010之后才有的。

在SharePoint 2007上要用stsadm 。但是stsadm对命令的支持比较有限。
http://blogs.technet.com/b/josebda/archive/2008/03/15/complete-reference-of-all-stsadm-operations-with-parameters-in-moss-2007-sp1.aspx
------解决思路----------------------
SPFarm是正解,PowerShell是从SharePoint 2010版本引入的,之前的命令行是stsadm命令,也比较丰富;
这里有一个PowerShell命令和stsadm命令的映射表
https://technet.microsoft.com/zh-CN/library/ff621084(v=office.15).aspx

再有Get-PSFarm,也应该是Get-SPFarm。
------解决思路----------------------
特别要说的是stsadm是cmd命令行执行,2007版本要到12/bin目录下,然后在执行
------解决思路----------------------
Unfortunately SharePoint 2010's Management Shell (it's PowerShell snap-in and associated cmdlets) is not compatible with MOSS 2007 and there aren't cmdlets available directly from Microsoft for that version of SharePoint.

What that means is that you can still use PowerShell with MOSS 2007, but you're either going to have to write your own cmdlets that use STSADM or the SharePoint Object Model directly, or you're going to have to use MOSS 2007-compatible cmdlets from a third party. I'd suggest checking out Gary Lapointe's blog for a lot of great PowerShell cmdlets for MOSS 2007 (http://blog.falchionconsulting.com/), or places where people upload cmdlets such as CodePlex.com, the TechNet Script Repository, POSHCode.org, or http://get-spscripts.com/.
  相关解决方案