This project is read-only.
Script No 001: Active SharePoint features report. Helps to identify what features are active for the specified SharePoint site.

Parameters: Site URL, output CSV file name

Output: CSV file that contains features Title, Id and Description. File name is the following format <sitetitle><parameter value of output CSV file name>

Usage example: .\sitefeaturesreport.ps1 http://siteURL featuresreport.csv

Script No 002: Create SharePoint Document Library. Creates a document library in the specified SharePoint site.

-SiteURL URL of the site
-Template list template value of type SPListTemplate enumeration. List of possible values here Default value = "DocumentLibrary".
-Description library description. Default value = "Library for test purposes".
-QuickLaunch display on Quick Launch. Default value = $false.
-EnableVersioning versioning is enabled. Default value = $false.
-EnableContentType allow management of content types. Default value = $false.
-ContentType Content Type name to add if -EnableContentType is $true. Must exist in the site collection.

Usage examples:

create a document library with default parameter values on a specified site
.\createdocumentlibrary.ps1 http://YourSiteURL

create a document library and display on Quick Launch with all other parameters as default
.\createdocumentlibrary.ps1 http://YourSiteURL -QuickLaunch $true

Script No 003: Create SharePoint Site Content Type. Creates a content type in a specified SharePoint site collection.

-SiteURL URL of the site
-ContentTypeName content type name. Default value = "Test Content Type".
-BaseContentTypeName base content type name. Default value = "Document".
-ContentTypeGroupName group name of the newly created content type. Default value = "Test Site Content Types"
-Fields array of fields display names that have to be added to the newly created content type. Fields should exist prior to content type creation. Example: "End Date","Language"
-FieldsGroupName group name of the columns to be added. Example: "Base Columns"
-Publish set to publish the content type if it is being created is on the Content Type Syndication Hub. Default value = $false.

Usage examples:

create a content type Customer Document based on Document content type and add two custom columns Business Category and Matter Number from the custom group WS Columns

.\createsitecontenttype.ps1 -SiteURL http://YourSiteURL -ContentTypeName "Customer Document" -BaseContentTypeName "Document" -ContentTypeGroupName "WS Content Types" -Fields "Business Category","Matter Number" -FieldsGroupName "WS Columns"

Script No 004 - Get All Webs for Site Collection. Gets all Webs for the specified Site Collection URL.

-SiteURL URL of the site

Output: CSV file that contains URLs of the Webs. File name has got the following format "all_webs_for_site_<timestamp>.csv"

Usage example:
.\getallwebsforsite.ps1 http://YourSiteURL

Last edited Sep 28, 2012 at 2:35 AM by WyldeSolutions, version 10


No comments yet.