Share via


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:  https://www.codeplex.com/SPoshMod)

The files can be found here:

https://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("https://yoursite/subsite")
$web.Users | ft  Name, Email

Display the disk usage for a site collection
$site = get-site("https://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: https://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

Comments

  • Anonymous
    August 13, 2008
    I've been in some rather deep discussions on Enterprise features, so I thought I would share some findings

  • Anonymous
    January 30, 2009
    Eric Kraus has a good post on the various GUIDs associated with the Enterprise features of Microsoft