[PowerShell]如何取得SPS2010的常用参数

取得 Sharepoint DLL

$path = "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14"

Get-ChildItem $path -recurse |
  Where-Object {$_.name -like "*SharePoint*.dll"} |
  Sort-Object -Property Name -unique |
  Format-Table Name


取得 Sharepoint Farm 参数

Get-SPFarm | Format-List Id, BuildVersion, Servers, Solutions

Delete all of Sites

Get-SPSite -Limit All |
  foreach {
    Remove-SPSite -identity $_.Id
  }


用关键字取得 site 列表 

Get-SPSite -Limit All | where {$_.Url -like "*《key》*"}


取得 features 表

Get-SPFeature -Limit ALL |
  Where-Object {$_.DisplayName -like "*Publishing*"} |
  Sort-Object -Property Scope
  Format-Table DisplayName, Id, Scope

原文地址:https://www.cnblogs.com/by1455/p/1638430.html