list of SharePoint lists using cascading coloumn from targetted set of site collections

sns 9,226 Reputation points
2021-02-15T05:57:20.407+00:00

Do we have any script to get list of SharePoint lists using cascading columns from targeted set of site collections.
Please help
67940-css.jpg
attached screenshot shows types of cascading columns. server is 2010

SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,864 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Li Zhang_MSFT 1,566 Reputation points
    2021-02-16T10:03:32.22+00:00

    Hi @sns ,

    Could you tell me how did you create Cascading Drop Down List column type?

    In general, we could get lists with normal column type using following script:

    Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue  
           
     #Set Parameters  
     $WebAppURL="WebAppURL"  
     $ReportOutput="C:\temp\getlists.csv"  
          
     $ResultData = @()  
          
     #Delete the Output report file if exists  
     If (Test-Path $ReportOutput) { Remove-Item $ReportOutput }  
            
     #Get all site collections from the web application  
     Get-SPWebApplication $WebAppURL | Get-SPSite -Limit ALL | Get-SPWeb -Limit ALL -PipelineVariable Web | ForEach-Object {  
         Write-host -f Yellow "Processing Site: "$Web.URL  
             
         #Get all lists - Exclude Hidden System lists  
         $ListCollection = $Web.lists | Where-Object  { ($_.hidden -eq $false) -and ($_.IsSiteAssetsLibrary -eq $false)}  
               
         #Iterate through All lists and Libraries  
         ForEach ($List in $ListCollection)  
         {  
          
                 if( $List.Fields | where-object { $_.TypeDisplayName -eq "COLUMNTYPE"} )  
                 {  
                  
                     $ResultData+= New-Object PSObject -Property @{  
                     'Site Title' = $Web.Title  
                     'Site URL' = $Web.URL  
                     'List/Library Name' = $List.Title  
                     'Item Count' = $List.ItemCount  
                     'Created By' = $List.Author.DisplayName  
                     'Last Modified' = $List.LastItemModifiedDate.ToString();  
                     'List URL' = "$($Web.Url)/$($List.RootFolder.Url)"  
                     }  
                 }  
         }  
     }  
          
     #Append data to CSV  
     $ResultData | Export-Csv $ReportOutput -NoTypeInformation -Append   
       
     Write-host -f Green "Report Generated Successfully at : "$ReportOutput  
    

    -------------------------------------------------------------------------------------------------------------------------------------------

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.