Monday, April 14, 2014

Create SharePoint Link List using PowerShell

PowerShell script to create Link list in SharePoint:

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

Function Create-LinkList($WebURL, $ListName, $ListDescription)
        $ErrorActionPreference ="Stop" 

        #Get the Web
        $Web = Get-SPWeb $WebURL

        #Get link list template
        $LinkListTemplate = [Microsoft.SharePoint.SPListTemplateType]::Links
        #Create link list

        write-host “New List has been created!"-foregroundcolor Green
    catch [System.SystemException]
        write-host "List Creation failed due to:" $_.Exception.Message -foregroundcolor Red
        #Dispose web object
        $ErrorActionPreference ="Continue" 

#Call the function to create Link lisst
 Create-LinkList "" "Quick Links" "List of frequently accessed sites" 

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.

Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...