Showing posts with label PowerShell script to get List name and GUID. Show all posts
Showing posts with label PowerShell script to get List name and GUID. Show all posts

Tuesday, May 27, 2014

PowerShell script to get List name and GUID


Here is a PowerShell script to get the List name along with GUID


[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
#Configure the location for the ListGUID output file
$OutputFile="C:\ListGUID.csv";
#Replace Yoursitename as needed
$site = Get-SPSite http://Yoursitename
$web = $site.RootWeb;
$web.lists | Select-Object title, id | Export-Csv -Path $OutputFile;
$web.Dispose();
$site.Dispose();