Welcome to MSDN Blogs Sign in | Join | Help

Eric Kraus' SharePoint/.NET Blog

What the field says about MOSS.

News

  • Subscribe to this blog


    Eric Kraus on Live Messenger




      Disclaimer
      These postings are provided "AS IS" with no warranties and confer no rights. In addition, these postings are my own and do not represent the views of Microsoft.
    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

    Posted: Thursday, July 31, 2008 11:43 AM by ekraus

    Comments

    Eric Kraus' SharePoint Blog said:

    I've been in some rather deep discussions on Enterprise features, so I thought I would share some findings

    # August 13, 2008 12:25 PM

    SharePoint Thinks, Links and Clinks said:

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

    # January 30, 2009 10:58 AM
    Anonymous comments are disabled
    Page view tracker