Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Sharepoint 2013 - Powershell - List References...

$
0
0

Hi

Below you can see some snippets of code. I have found web pages that say you can get a particular List (or whatever in a collection) by referencing the name...

So when i use the title or EntityTypeName, no item is found. If i manually find the index and use this, all OK.

>> What could be the issue ?

Thanks

$i = 0

$lists | ForEach-Object { Write-Host ('List: "{0}, {1}" Count {2}' -f $_.EntityTypeName, $_.Title, $_.ItemCount) if ($_.Title -eq 'Existing Network Folder Notes') { $index = $i } $i++ } # List: "FOldersList, Existing Network Folder Notes" Count 100 $list = $lists[$index] # works $list = $lists['Existing Network Folder Notes'] # or "FOldersList" does not work




Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>