SharePoint PowerShell Power Pack


Using PowerShell to support SharePoint has saved me quite a bit of time.  I can do just about everything I would do in .NET, only without firing up Visual Studio just to check a property of a SPWeb object.


I have compiled a collection of PowerShell functions and methods that I commonly use.  It's in its beginning stages, but I hope to continue building on it.


[Edit:  SPPowerShellPack has been merged into  SPoshMod codeplex project.  The PowerShell v2 module can be found here:  http://www.codeplex.com/SPoshMod)



The files can be found here:


http://cid-7475f7deaa12cac3.skydrive.live.com/browse.aspx/Blog%20Source%20Code/SPPowerShellPack


There are two files:  (1) SPPowerShellPack.bat  and (2) SPPowerShellPack.ps1


Edit the batch file and rename to the location where you download the script files to.


You will need to download and install PowerShell 1.0 (or greater).  Then, just double-click on the batch file to start the PowerShell command window.


Examples of PowerShell commands:


Display the names of all users in a sub-site (web)
$web = get-web("http://yoursite/subsite")
$web.Users | ft  Name, Email


Display the disk usage for a site collection
$site = get-site("http://yoursite")
$site.Usage.Storage


Display the properties of a feature by passing in a GUID
get-feature("00BFEA71-52D4-45B3-B544-B1C71B620109")


For more information on PowerShell: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

Comments (2)
  1. I’ve been in some rather deep discussions on Enterprise features, so I thought I would share some findings

  2. Eric Kraus has a good post on the various GUIDs associated with the Enterprise features of Microsoft

Comments are closed.

Skip to main content