Create SharePoint Link List using PowerShell

Requirement: Create Link List in SharePoint using PowerShell

Here is the PowerShell script to create a 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 a Link list
Create-LinkList "" "Quick Links" "List of frequently accessed sites"

Refer to the Microsoft documentation for all list template types:

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. Passionate about sharing the deep technical knowledge and experience to help others, through the real-world articles!

Leave a Reply

Your email address will not be published. Required fields are marked *