Forum Discussion
Dean_Gross
Oct 07, 2016Silver Contributor
PowerShell examples - Get-SPOList and Get-SPOListItems
Does anyone have any suggestions about where i can find some good examples using the pnp Get-SPOList and Get-SPOListItems cmdlets? The examples in github are very basic and I'm struggling with the b...
Daniel Westerdale
Jun 09, 2017Iron Contributor
Good morning. I have previously written PS to get file data on every library and every site without issues. Today, I am asked to report on the output from a Nintex form and Workflow I created last year:
The ps below works ( even though I hate the syntax) . However, I now want to bring back multiple fields such as FieldValues.Last_x0020_Name etc, I awas hoping to do this with a single line - this is what I am struggling with:
(Get-PnPListItem -web (Get-PnPWeb) -List ((Get-PnPList -web (Get-PnPWeb))|where {$_.Title -eq $listNewJoiners})).FieldValues.First_x0020_Name
Jun 09, 2017
How about using a select
so for example you could run
dir | select Name, Length
to display files in a folder, but just display their name and length.
Similar your example:
(Get-PnPListItem -web (Get-PnPWeb) -List ((Get-PnPList -web (Get-PnPWeb))|where {$_.Title -eq $listNewJoiners})).FieldValues | select First_x0020_Name, Last_x0020_Name
- Daniel WesterdaleJun 09, 2017Iron Contributor
Thanks , all I needed was to pipe the Select statement and then field nivarna . Thanks again
Daniel