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();


 

No comments:

Post a Comment