PowerShell examples - Get-SPOList and Get-SPOListItems

%3CLINGO-SUB%20id%3D%22lingo-sub-19571%22%20slang%3D%22en-US%22%3EPowerShell%20examples%20-%20Get-SPOList%20and%20Get-SPOListItems%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-19571%22%20slang%3D%22en-US%22%3E%3CP%3EDoes%20anyone%20have%20any%20suggestions%20about%20where%20i%20can%20find%20some%20good%20examples%20using%20the%20pnp%20Get-SPOList%20and%20Get-SPOListItems%20cmdlets%3F%26nbsp%3B%20The%20examples%20in%20github%20are%20very%20basic%20and%20I'm%20struggling%20with%20the%20best%20way%20to%20get%20field%20values%20so%20that%20i%20can%20use%20them%20in%20other%20commands.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Enot%20being%20able%20to%20search%20the%20old%20yammer%20forum%20is%20very%20frustrating%20(%3A%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-76614%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20examples%20-%20Get-SPOList%20and%20Get-SPOListItems%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-76614%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2387%22%20target%3D%22_blank%22%3E%40Pieter%20Veenstra%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20%2C%20all%20I%20needed%20was%20to%20pipe%20the%20Select%20statement%20and%20then%20field%20nivarna%20.%20%26nbsp%3BThanks%20again%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDaniel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-76610%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20examples%20-%20Get-SPOList%20and%20Get-SPOListItems%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-76610%22%20slang%3D%22en-US%22%3E%3CP%3EHow%20about%20using%20a%20select%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eso%20for%20example%20you%20could%20run%3C%2FP%3E%3CPRE%3Edir%20%7C%20select%20Name%2C%20Length%3C%2FPRE%3E%3CP%3Eto%20display%20files%20in%20a%20folder%2C%20but%20just%20display%20their%20name%20and%20length.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESimilar%26nbsp%3Byour%20example%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E(Get-PnPListItem%20-web%20(Get-PnPWeb)%20-List%20((Get-PnPList%20-web%20(Get-PnPWeb))%7Cwhere%20%7B%24_.Title%20-eq%20%24listNewJoiners%7D)).FieldValues%20%20%7C%20select%20First_x0020_Name%2C%20Last_x0020_Name%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-76609%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20examples%20-%20Get-SPOList%20and%20Get-SPOListItems%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-76609%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2387%22%20target%3D%22_blank%22%3E%40Pieter%20Veenstra%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGood%20morning.%20%26nbsp%3BI%20have%20previously%20written%20PS%20to%20get%20file%20data%20on%20every%20library%20and%20every%20site%20without%20issues.%20Today%2C%20I%20am%20asked%20to%20report%20on%20the%20output%20from%20a%20Nintex%20form%20and%20Workflow%20I%20created%20last%20year%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20ps%20below%20works%20(%20even%20though%20I%20hate%20the%20syntax)%20.%20%26nbsp%3BHowever%2C%20I%20now%20want%20to%20bring%20back%20multiple%20fields%20such%20as%20FieldValues.Last_x0020_Name%20etc%2C%20I%20awas%20hoping%20to%20do%20this%20with%20a%20single%20line%20-%20this%20is%20what%20I%20am%20struggling%20with%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E(Get-PnPListItem%20-web%20(Get-PnPWeb)%20-List%20((Get-PnPList%20-web%20(Get-PnPWeb))%7Cwhere%20%7B%24_.Title%20-eq%20%24listNewJoiners%7D)).FieldValues.First_x0020_Name%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-70009%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20examples%20-%20Get-SPOList%20and%20Get-SPOListItems%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-70009%22%20slang%3D%22en-US%22%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F36392%22%20target%3D%22_blank%22%3E%40Kwok-Ho%20Lam%3C%2FA%3E%20wrote%3A%3CBR%20%2F%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOnly%202%20calls%20to%20the%20server%20in%20this%20case%2C%20instead%20of%2012%20and%20saves%203%20Where-clauses%20on%20the%20clientside%2C%20since%20the%20server%20is%20much%20faster.%20You%20can%20also%20add%20CAML%20to%20filter%20through%20items%3C%2FP%3E%3CP%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%20color%3D%22%23ff4500%22%3E%24query%3C%2FFONT%3E%20%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%20color%3D%22%23a9a9a9%22%3E%3D%3C%2FFONT%3E%20%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%20color%3D%22%238b0000%22%3E%22%3CVIEW%3E%3CQUERY%3E%3CWHERE%3E%3CEQ%3E%3CFIELDREF%20name%3D%22'ID'%22%3E%3C%2FFIELDREF%3E%3CVALUE%20type%3D%22'Number'%22%3E123%3C%2FVALUE%3E%3C%2FEQ%3E%3C%2FWHERE%3E%3C%2FQUERY%3E%3C%2FVIEW%3E%22%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%20color%3D%22%238b0000%22%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%20color%3D%22%23ff4500%22%3E%24SalesListItems%20%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%20color%3D%22%23a9a9a9%22%3E%3D%3C%2FFONT%3E%20%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%20color%3D%22%230000ff%22%3EGet-SPOListItem%3C%2FFONT%3E%20%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%20color%3D%22%23000080%22%3E-List%3C%2FFONT%3E%20%22Sales%20list%22%20%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%20color%3D%22%23000080%22%3E-Query%3C%2FFONT%3E%20%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%20color%3D%22%23ff4500%22%3E%24query%3C%2FFONT%3E%20%3C%2FP%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3EOn%20the%20subject%20of%20using%20a%20query%20%2C%20Get-PnPListItem%20seems%20limited%2C%20if%20we%20want%20to%20bring%20the%20non%20default%20fieds.%20%26nbsp%3BSay%20I%20view%20all%20FIles%20in%20libraries%20and%20or%20Folders%20in%20%26nbsp%3Bone%20or%20more%20Team%20Sites%20that%20were%20modified%20in%20the%20last%20month%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%24startDate%20%3D%20Get-Date%20%2201%2F04%2F2017%22%20%0A%24startDatestring%20%3D%20%24startDate.ToString(%22yyyy-MM-ddTHH%3Amm%3AssZ%22)%0A%24endDate%20%3D%20Get-Date%20%2201%2F05%2F2017%22%0A%24endDatestring%20%3D%20%24endDate.ToString(%22yyyy-MM-ddTHH%3Amm%3AssZ%22)%0A%0A%24query%20%3D%20%20%20%60%0A%20%22%3CVIEW%3E%3CQUERY%3E%3CWHERE%3E%20%20%60%0A%20%20%20%3CAND%3E%20%60%0A%20%20%20%20%20%20%3CGEQ%3E%20%60%0A%20%20%20%20%20%20%20%20%20%3CFIELDREF%20name%3D%22Modifed%22%3E%3C%2FFIELDREF%3E%20%3CVALUE%20includetimevalue%3D%22FALSE%22%3E%22%20%2B%20%24startDatestring%20%2B%20%22%3C%2FVALUE%3E%20%60%0A%20%20%20%20%20%20%3C%2FGEQ%3E%20%60%0A%20%20%20%20%20%20%3CLEQ%3E%20%60%0A%20%20%20%20%20%20%20%20%3CFIELDREF%20name%3D%22Modifed%22%3E%3C%2FFIELDREF%3E%20%60%0A%20%20%20%20%20%20%20%20%20%3CVALUE%20includetimevalue%3D%22FALSE%22%20type%3D%22DateTime%22%3E%22%20%2B%20%24endDatestring%20%2B%20%22%3C%2FVALUE%3E%20%60%0A%20%20%20%20%20%3C%2FLEQ%3E%20%60%0A%20%20%20%20%3C%2FAND%3E%20%60%0A%20%20%20%3C%2FWHERE%3E%3C%2FQUERY%3E%3C%2FVIEW%3E%22%0A%0A%23%20THIS%20WON'T%20WORK%20AS%20YOU%20NEED%20-Fields%20%22FileLeafRef%22%2C%20%22Modified%22%20IF%20YOU%20WANT%20TO%20GET%20THIS%20INCLUDED%3CBR%20%2F%3E%23%20%20IN%20THE%20OUTPUT%20BUT%20THS%20MEANS%20-QUERY%20IS%20IGNORED%0AGet-PnPListItem%20-List%20Document%20-Query%20%24query%20-Web%20%24locationWeb%3C%2FPRE%3E%3CP%3EIf%20the%20above%20is%20not%20possible%20then%20it%20is%20back%20to%20bringing%20everything%20back....%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3EForeach(%24item%20in%20%24items)%20%7B%0Awrite-host%20%24item.Modified.ToString()%0A%2F%2F%20check%20Modified%20date%20range%20here%0A%0A%7D%3C%2FPRE%3E%3CP%3EJust%20seems%20not%20the%20quickest%20way%20to%20get%20the%20results%20I%20am%20looking%20for%20%3B-(%20.%20Is%20the%20query%20with%20extended%20attributes%20something%20I%20should%20request%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-39500%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20examples%20-%20Get-SPOList%20and%20Get-SPOListItems%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-39500%22%20slang%3D%22en-US%22%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2387%22%20target%3D%22_blank%22%3E%40Pieter%20Veenstra%3C%2FA%3E%20wrote%3A%3CBR%20%2F%3E%3CP%3Eto%20get%20the%20Author%20details%20you%20could%20do%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E(Get-SPOListItem%20-web%20(Get-SPOWeb)%20-List%20((Get-SPOList%20-web%20(Get-SPOWeb))%7Cwhere%20%7B%24_.Title%20-eq%20%22Sales%20list%22%7D))%5B1%5D.FieldValues.Author%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E(Get-SPOListItem%20-web%20(Get-SPOWeb)%20-List%20((Get-SPOList%20-web%20(Get-SPOWeb))%7Cwhere%20%7B%24_.Title%20-eq%20%22Sales%20list%22%7D))%5B1%5D.FieldValues.Author.Email%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E(Get-SPOListItem%20-web%20(Get-SPOWeb)%20-List%20((Get-SPOList%20-web%20(Get-SPOWeb))%7Cwhere%20%7B%24_.Title%20-eq%20%22Sales%20list%22%7D))%5B1%5D.FieldValues.Author.LookupValue%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3EEverytime%20you%20use%20Get-SPO....%20it%20triggers%20a%20call%20to%20the%20server.%20for%20perfomance%20enhancements%20(and%20since%20the%20ListTitle%20is%20already%20hardcoded)%20use%20something%20like%3A%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24url%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%3D%3C%2FFONT%3E%20%3CFONT%20color%3D%22%238b0000%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%22http%3A%2F%2Flocalhost%22%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%230000ff%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3EConnect-SPOnline%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000080%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%E2%80%93Url%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24url%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000080%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E-CurrentCredentials%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E(%3C%2FFONT%3E%3CFONT%20color%3D%22%230000ff%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3EGet-SPOListItem%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000080%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E-List%3C%2FFONT%3E%20%3CFONT%20color%3D%22%238b0000%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%22Sales%20list%22%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E)%3C%2FFONT%3E%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%5B%3C%2FFONT%3E%3CFONT%20color%3D%22%23800080%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E1%3C%2FFONT%3E%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%5D.%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3EFieldValues%3C%2FFONT%3E%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E.%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3EAuthor%3C%2FFONT%3E%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E.%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3ELookupValue%3C%2FFONT%3E%20%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20saves%20in%20this%20case%2050%25%20of%20the%20calls%20to%20the%20server.%20or%20better%3A%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24url%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%3D%3C%2FFONT%3E%20%3CFONT%20color%3D%22%238b0000%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%22http%3A%2F%2Flocalhost%22%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%230000ff%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3EConnect-SPOnline%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000080%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%E2%80%93Url%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24url%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000080%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E-CurrentCredentials%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24SalesListItems%20%3C%2FFONT%3E%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%3D%3C%2FFONT%3E%20%3CFONT%20color%3D%22%230000ff%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3EGet-SPOListItem%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000080%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E-List%3C%2FFONT%3E%20%3CFONT%20color%3D%22%238b0000%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%22Sales%20list%22%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24SalesListItems%3C%2FFONT%3E%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%5B%3C%2FFONT%3E%3CFONT%20color%3D%22%23800080%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E1%3C%2FFONT%3E%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%5D.%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3EFieldValues%3C%2FFONT%3E%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E.%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3EAuthor%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24SalesListItems%3C%2FFONT%3E%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%5B%3C%2FFONT%3E%3CFONT%20color%3D%22%23800080%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E1%3C%2FFONT%3E%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%5D.%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3EFieldValues%3C%2FFONT%3E%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E.%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3EAuthor%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E.Email%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24SalesListItems%3C%2FFONT%3E%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%5B%3C%2FFONT%3E%3CFONT%20color%3D%22%23800080%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E1%3C%2FFONT%3E%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%5D.%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3EFieldValues%3C%2FFONT%3E%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E.%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3EAuthor%3C%2FFONT%3E%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E.%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3ELookupValue%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOnly%202%20calls%20to%20the%20server%20in%20this%20case%2C%20instead%20of%2012%20and%20saves%203%20Where-clauses%20on%20the%20clientside%2C%20since%20the%20server%20is%20much%20faster.%20You%20can%20also%20add%20CAML%20to%20filter%20through%20items%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24query%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%3D%3C%2FFONT%3E%20%3CFONT%20color%3D%22%238b0000%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%22%3CVIEW%3E%3CQUERY%3E%3CWHERE%3E%3CEQ%3E%3CFIELDREF%20name%3D%22'ID'%22%3E%3C%2FFIELDREF%3E%3CVALUE%20type%3D%22'Number'%22%3E123%3C%2FVALUE%3E%3C%2FEQ%3E%3C%2FWHERE%3E%3C%2FQUERY%3E%3C%2FVIEW%3E%22%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%238b0000%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24SalesListItems%20%3C%2FFONT%3E%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%3D%3C%2FFONT%3E%20%3CFONT%20color%3D%22%230000ff%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3EGet-SPOListItem%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000080%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E-List%3C%2FFONT%3E%20%22Sales%20list%22%20%3C%2FFONT%3E%3CFONT%20color%3D%22%23000080%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E-Query%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24query%3C%2FFONT%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-30545%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20examples%20-%20Get-SPOList%20and%20Get-SPOListItems%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-30545%22%20slang%3D%22en-US%22%3EThanks%20very%20much%20I%20use%20that.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-30543%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20examples%20-%20Get-SPOList%20and%20Get-SPOListItems%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-30543%22%20slang%3D%22en-US%22%3E%3CP%3Eto%20get%20the%20Author%20details%20you%20could%20do%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E(Get-SPOListItem%20-web%20(Get-SPOWeb)%20-List%20((Get-SPOList%20-web%20(Get-SPOWeb))%7Cwhere%20%7B%24_.Title%20-eq%20%22Sales%20list%22%7D))%5B1%5D.FieldValues.Author%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E(Get-SPOListItem%20-web%20(Get-SPOWeb)%20-List%20((Get-SPOList%20-web%20(Get-SPOWeb))%7Cwhere%20%7B%24_.Title%20-eq%20%22Sales%20list%22%7D))%5B1%5D.FieldValues.Author.Email%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E(Get-SPOListItem%20-web%20(Get-SPOWeb)%20-List%20((Get-SPOList%20-web%20(Get-SPOWeb))%7Cwhere%20%7B%24_.Title%20-eq%20%22Sales%20list%22%7D))%5B1%5D.FieldValues.Author.LookupValue%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-30542%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20examples%20-%20Get-SPOList%20and%20Get-SPOListItems%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-30542%22%20slang%3D%22en-US%22%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2387%22%20target%3D%22_blank%22%3E%40Pieter%20Veenstra%3C%2FA%3E%20wrote%3A%3CBR%20%2F%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F5701%22%20target%3D%22_blank%22%3E%40Daniel%20Westerdale%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20one%20line%20option%26nbsp%3B%3Cimg%20id%3D%22smileyhappy%22%20class%3D%22emoticon%20emoticon-smileyhappy%22%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Fi%2Fsmilies%2F16x16_smiley-happy.png%22%20alt%3D%22Smiley%20Happy%22%20title%3D%22Smiley%20Happy%22%20%2F%3E%26nbsp%3B%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E(Get-SPOListItem%20-web%20(Get-SPOWeb)%26nbsp%3B-List%20((Get-SPOList%20-web%20(Get-SPOWeb))%7Cwhere%20%7B%24_.Title%20-eq%20%22Sales%20list%22%7D))%5B1%5D.FieldValues%3C%2FP%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2387%22%20target%3D%22_blank%22%3E%40Pieter%20Veenstra%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20-%20I%20like%20it%20but%20I%20have%20discoved%20the%20same%20issue%20as%20I%20have%20%26nbsp%3Bmy%20code%20snippet%20%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20those%20names%20for%20auditing%20purposes%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3EId%20Name%20%20%20%20Modified%20%20%20%20%20%20%20%20%20%20%20%20Author%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A--%20----%20%20%20%20--------%20%20%20%20%20%20%20%20%20%20%20%20------%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A24%2024_.000%2017%2F11%2F2016%2014%3A44%3A39%20Microsoft.SharePoint.Client.FieldUserValue%0A25%2025_.000%2017%2F11%2F2016%2015%3A01%3A47%20Microsoft.SharePoint.Client.FieldUserValue%0A27%2027_.000%2017%2F11%2F2016%2014%3A47%3A39%20Microsoft.SharePoint.Client.FieldUserValue%0A%0A%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-30540%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20examples%20-%20Get-SPOList%20and%20Get-SPOListItems%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-30540%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F5701%22%20target%3D%22_blank%22%3E%40Daniel%20Westerdale%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20one%20line%20option%26nbsp%3B%3Cimg%20id%3D%22smileyhappy%22%20class%3D%22emoticon%20emoticon-smileyhappy%22%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Fi%2Fsmilies%2F16x16_smiley-happy.png%22%20alt%3D%22Smiley%20Happy%22%20title%3D%22Smiley%20Happy%22%20%2F%3E%26nbsp%3B%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E(Get-SPOListItem%20-web%20(Get-SPOWeb)%26nbsp%3B-List%20((Get-SPOList%20-web%20(Get-SPOWeb))%7Cwhere%20%7B%24_.Title%20-eq%20%22Sales%20list%22%7D))%5B1%5D.FieldValues%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-30537%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20examples%20-%20Get-SPOList%20and%20Get-SPOListItems%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-30537%22%20slang%3D%22en-US%22%3E%3CP%3EHI%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2387%22%20target%3D%22_blank%22%3E%40Pieter%20Veenstra%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1096%22%20target%3D%22_blank%22%3E%40Dean%20Gross%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%20%26nbsp%3BI%20might%20end%20up%20using%20that.%20%26nbsp%3BI%20did%20something%20similar%20a%20while%20back%20but%20I%20thought%20I%20need%20to%20do%26nbsp%3B%3C%2FP%3E%3CP%3ESPOExecute%20as%20we%20do%20for%20standard%20CSOM%20to%20populate%20our%20client%20side%20objects.%20%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnyway%20I%20digress%2C%20%26nbsp%3BI%20intended%20to%20bring%20back%20some%20standard%20field%20for%20each%20list%20item%20%26nbsp%3Bwith%20one%20line%20of%20PS%20code%20using%20a%20pipeline%20but%20it%20doesn't%20look%20like%20it%20%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-30521%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20examples%20-%20Get-SPOList%20and%20Get-SPOListItems%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-30521%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F5701%22%20target%3D%22_blank%22%3E%40Daniel%20Westerdale%3C%2FA%3E%2C%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1096%22%20target%3D%22_blank%22%3E%40Dean%20Gross%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESorry%20I%20missed%20something%20in%20my%20previous%26nbsp%3B%20example.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethis%20is%20the%20correct%20code%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%24web%20%3D%20Get-SPOWeb%3C%2FP%3E%3CP%3E%24lists%20%3D%20Get-SPOList%20-web%20%24web%3CBR%20%2F%3E%24list%20%3D%20%24lists%20%7Cwhere%20%7B%24_.Title%20-eq%20%22Sales%20list%22%7D%3CBR%20%2F%3E%24items%20%3D%20Get-SPOListItem%20-web%20%24web%20-List%20%24list%3CBR%20%2F%3E%24items%5B1%5D.FieldValues%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-30515%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20examples%20-%20Get-SPOList%20and%20Get-SPOListItems%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-30515%22%20slang%3D%22en-US%22%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1096%22%20target%3D%22_blank%22%3E%40Dean%20Gross%3C%2FA%3E%20wrote%3A%3CBR%20%2F%3E%3CP%3EThanks%2C%20i%20just%20trying%20to%20read%20some%20values%20from%20a%20list%20so%20that%20I%20can%20use%20them%20to%20create%20some%20new%20site%20collections.%20The%20fields%20are%20getting%20returned%20without%20any%20values%2C%3CBR%20%2F%3EI%20tried%20the%20example%20from%20the%20above%20document%2C%20and%20I%20get%20the%20following%3CBR%20%2F%3ESupply%20values%20for%20the%20following%20parameters%3A%3CBR%20%2F%3ETitle%20%3A%3CBR%20%2F%3EDescription%20%3A%3CBR%20%2F%3EBaseTemplate%20ID%20%3A%3CBR%20%2F%3ECreated%20Date%20%3A%3CBR%20%2F%3EList%20ID%20%3A%3CBR%20%2F%3EImageUrl%20%3A%3CBR%20%2F%3EItemCount%20%3A%3CBR%20%2F%3EOnQuickLaunch%20%3A%3CBR%20%2F%3E%3CBR%20%2F%3EOther%20spo%20cmdlets%20seem%20to%20be%20working%20fine.%20I%20can't%20figure%20out%20what%20would%20be%20causing%20me%20to%20get%20no%20values.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20figure%20out%20that%20i%20need%20to%20include%20%5CLists%5C%20in%20the%20listname%20parameter.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20I%20just%20need%20to%20figure%20out%20how%20to%20get%20the%20value%20out%20of%20a%20column%20that%20returns%20Microsoft.SharePoint.Client.FieldUrlValue%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20relearned%20that%20this%20can%20be%20done%20by%20using%20the%20following%20syntax%3C%2FP%3E%3CP%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%20color%3D%22%23ff4500%22%3E%24listItem%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%20color%3D%22%23a9a9a9%22%3E%5B%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%20color%3D%22%238b0000%22%3E%22SPOUrl%22%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%20color%3D%22%23a9a9a9%22%3E%5D.%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3EUrl%3C%2FFONT%3E%20%3C%2FP%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3EHi%20I%20have%20the%20same%20issue%20with%20the%20Author%20%22Created%20By%22column%20as%20this%26nbsp%3BClient.FieldUserValue%20.%20%26nbsp%3B%20I%20thought%20I%20could%20use%20but%20it%20doesn't%20quite%20work%26nbsp%3B%3Cimg%20id%3D%22smileymad%22%20class%3D%22emoticon%20emoticon-smileymad%22%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Fi%2Fsmilies%2F16x16_smiley-mad.png%22%20alt%3D%22Smiley%20Mad%22%20title%3D%22Smiley%20Mad%22%20%2F%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3EGet-SPOListItem%20%20%24listName%20%20-Fields%20%22FileLeafRef%22%2C%20%22Modified%22%2C%20%22Author%22%20%7C%20%25%7Bnew-object%20psobject%20-property%20%20%40%7BId%20%3D%20%24_.Id%3B%20Name%20%3D%20%24_%5B%22FileLeafRef%22%5D%3B%20Modified%20%3D%20%24_%5B%22Modified%22%5D%3B%20Author%20%3D%20%24_%5B%22Author%22%5D%20%20%7D%7D%20%7C%20select%20Id%2C%20Name%2C%20Modified%2C%20Author%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can%20see%20you%20have%20used%20another%20approach%20and%20probably%20get-spoContext%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-19608%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20examples%20-%20Get-SPOList%20and%20Get-SPOListItems%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-19608%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%2C%20i%20just%20trying%20to%20read%20some%20values%20from%20a%20list%20so%20that%20I%20can%20use%20them%20to%20create%20some%20new%20site%20collections.%20The%20fields%20are%20getting%20returned%20without%20any%20values%2C%3CBR%20%2F%3EI%20tried%20the%20example%20from%20the%20above%20document%2C%20and%20I%20get%20the%20following%3CBR%20%2F%3ESupply%20values%20for%20the%20following%20parameters%3A%3CBR%20%2F%3ETitle%20%3A%3CBR%20%2F%3EDescription%20%3A%3CBR%20%2F%3EBaseTemplate%20ID%20%3A%3CBR%20%2F%3ECreated%20Date%20%3A%3CBR%20%2F%3EList%20ID%20%3A%3CBR%20%2F%3EImageUrl%20%3A%3CBR%20%2F%3EItemCount%20%3A%3CBR%20%2F%3EOnQuickLaunch%20%3A%3CBR%20%2F%3E%3CBR%20%2F%3EOther%20spo%20cmdlets%20seem%20to%20be%20working%20fine.%20I%20can't%20figure%20out%20what%20would%20be%20causing%20me%20to%20get%20no%20values.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20figure%20out%20that%20i%20need%20to%20include%20%5CLists%5C%20in%20the%20listname%20parameter.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20I%20just%20need%20to%20figure%20out%20how%20to%20get%20the%20value%20out%20of%20a%20column%20that%20returns%20Microsoft.SharePoint.Client.FieldUrlValue%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20relearned%20that%20this%20can%20be%20done%20by%20using%20the%20following%20syntax%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23ff4500%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%24listItem%3C%2FFONT%3E%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%5B%3C%2FFONT%3E%3CFONT%20color%3D%22%238b0000%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%22SPOUrl%22%3C%2FFONT%3E%3CFONT%20color%3D%22%23a9a9a9%22%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3E%5D.%3C%2FFONT%3E%3CFONT%20face%3D%22Lucida%20Console%22%20size%3D%221%22%3EUrl%3C%2FFONT%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-19587%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20examples%20-%20Get-SPOList%20and%20Get-SPOListItems%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-19587%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1096%22%20target%3D%22_blank%22%3E%40Dean%20Gross%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHave%20a%20look%20at%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fcsharpcorner.mindcrackerinc.netdna-cdn.com%2FUploadFile%2FEBooks%2F09212016073021AM%2FPdfFile%2Fbasic-operations-on-sharepoint-using-pnp-powershell-scripts.pdf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fcsharpcorner.mindcrackerinc.netdna-cdn.com%2FUploadFile%2FEBooks%2F09212016073021AM%2FPdfFile%2Fbasic-operations-on-sharepoint-using-pnp-powershell-scripts.pdf%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20are%20you%20trying%20to%20do%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethe%20basic%20examples%20are%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%24web%20%3D%20Get-SPOWeb%3C%2FP%3E%3CP%3E%24lists%20%3D%20Get-SPOList%20-web%20%24web%26nbsp%3B%3C%2FP%3E%3CP%3E%24list%20%3D%20%24lists%5B'ListName'%5D%3C%2FP%3E%3CP%3E%24listitems%20%3D%20Get-SPOListItem%20-web%20%24web%20-list%20%24list%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Respected Contributor

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 best way to get field values so that i can use them in other commands.

 

not being able to search the old yammer forum is very frustrating (:

14 Replies
Highlighted

Hi @Dean Gross

 

Have a look at this:

 

http://csharpcorner.mindcrackerinc.netdna-cdn.com/UploadFile/EBooks/09212016073021AM/PdfFile/basic-o...

 

What are you trying to do?

 

the basic examples are:

 

$web = Get-SPOWeb

$lists = Get-SPOList -web $web 

$list = $lists['ListName']

$listitems = Get-SPOListItem -web $web -list $list 

 

 

Highlighted

Thanks, i just trying to read some values from a list so that I can use them to create some new site collections. The fields are getting returned without any values,
I tried the example from the above document, and I get the following
Supply values for the following parameters:
Title :
Description :
BaseTemplate ID :
Created Date :
List ID :
ImageUrl :
ItemCount :
OnQuickLaunch :

Other spo cmdlets seem to be working fine. I can't figure out what would be causing me to get no values.

 

I figure out that i need to include \Lists\ in the listname parameter.

 

Now I just need to figure out how to get the value out of a column that returns Microsoft.SharePoint.Client.FieldUrlValue

 

I relearned that this can be done by using the following syntax

$listItem["SPOUrl"].Url

Highlighted

@Dean Gross wrote:

Thanks, i just trying to read some values from a list so that I can use them to create some new site collections. The fields are getting returned without any values,
I tried the example from the above document, and I get the following
Supply values for the following parameters:
Title :
Description :
BaseTemplate ID :
Created Date :
List ID :
ImageUrl :
ItemCount :
OnQuickLaunch :

Other spo cmdlets seem to be working fine. I can't figure out what would be causing me to get no values.

 

I figure out that i need to include \Lists\ in the listname parameter.

 

Now I just need to figure out how to get the value out of a column that returns Microsoft.SharePoint.Client.FieldUrlValue

 

I relearned that this can be done by using the following syntax

$listItem["SPOUrl"].Url


Hi I have the same issue with the Author "Created By"column as this Client.FieldUserValue .   I thought I could use but it doesn't quite work Smiley Mad

 

 

Get-SPOListItem  $listName  -Fields "FileLeafRef", "Modified", "Author" | %{new-object psobject -property  @{Id = $_.Id; Name = $_["FileLeafRef"]; Modified = $_["Modified"]; Author = $_["Author"]  }} | select Id, Name, Modified, Author

 

I can see you have used another approach and probably get-spoContext

Highlighted

Hi @Daniel Westerdale, @Dean Gross

 

Sorry I missed something in my previous  example.

 

this is the correct code:

 

$web = Get-SPOWeb

$lists = Get-SPOList -web $web
$list = $lists |where {$_.Title -eq "Sales list"}
$items = Get-SPOListItem -web $web -List $list
$items[1].FieldValues

Highlighted

HI @Pieter Veenstra @Dean Gross

 

Thanks,  I might end up using that.  I did something similar a while back but I thought I need to do 

SPOExecute as we do for standard CSOM to populate our client side objects.  

 

Anyway I digress,  I intended to bring back some standard field for each list item  with one line of PS code using a pipeline but it doesn't look like it  

 

 

 

Highlighted

Hi @Daniel Westerdale,

 

The one line option Smiley Happy :

 

(Get-SPOListItem -web (Get-SPOWeb) -List ((Get-SPOList -web (Get-SPOWeb))|where {$_.Title -eq "Sales list"}))[1].FieldValues

Highlighted

@Pieter Veenstra wrote:

Hi @Daniel Westerdale,

 

The one line option Smiley Happy :

 

(Get-SPOListItem -web (Get-SPOWeb) -List ((Get-SPOList -web (Get-SPOWeb))|where {$_.Title -eq "Sales list"}))[1].FieldValues


@Pieter Veenstra 

 

Thanks - I like it but I have discoved the same issue as I have  my code snippet  

 

I need those names for auditing purposes

 

Id Name    Modified            Author                                    
-- ----    --------            ------                                    
24 24_.000 17/11/2016 14:44:39 Microsoft.SharePoint.Client.FieldUserValue
25 25_.000 17/11/2016 15:01:47 Microsoft.SharePoint.Client.FieldUserValue
27 27_.000 17/11/2016 14:47:39 Microsoft.SharePoint.Client.FieldUserValue

Highlighted

to get the Author details you could do this:

 

(Get-SPOListItem -web (Get-SPOWeb) -List ((Get-SPOList -web (Get-SPOWeb))|where {$_.Title -eq "Sales list"}))[1].FieldValues.Author

 

(Get-SPOListItem -web (Get-SPOWeb) -List ((Get-SPOList -web (Get-SPOWeb))|where {$_.Title -eq "Sales list"}))[1].FieldValues.Author.Email

 

(Get-SPOListItem -web (Get-SPOWeb) -List ((Get-SPOList -web (Get-SPOWeb))|where {$_.Title -eq "Sales list"}))[1].FieldValues.Author.LookupValue

 

 

Highlighted
Thanks very much I use that.
Highlighted

@Pieter Veenstra wrote:

to get the Author details you could do this:

 

(Get-SPOListItem -web (Get-SPOWeb) -List ((Get-SPOList -web (Get-SPOWeb))|where {$_.Title -eq "Sales list"}))[1].FieldValues.Author

 

(Get-SPOListItem -web (Get-SPOWeb) -List ((Get-SPOList -web (Get-SPOWeb))|where {$_.Title -eq "Sales list"}))[1].FieldValues.Author.Email

 

(Get-SPOListItem -web (Get-SPOWeb) -List ((Get-SPOList -web (Get-SPOWeb))|where {$_.Title -eq "Sales list"}))[1].FieldValues.Author.LookupValue

 

 


Everytime you use Get-SPO.... it triggers a call to the server. for perfomance enhancements (and since the ListTitle is already hardcoded) use something like:

$url = "http://localhost"

Connect-SPOnline –Url $url -CurrentCredentials

(Get-SPOListItem -List "Sales list")[1].FieldValues.Author.LookupValue

 

It saves in this case 50% of the calls to the server. or better:

$url = "http://localhost"

Connect-SPOnline –Url $url -CurrentCredentials

$SalesListItems = Get-SPOListItem -List "Sales list"

$SalesListItems[1].FieldValues.Author

$SalesListItems[1].FieldValues.Author.Email

$SalesListItems[1].FieldValues.Author.LookupValue

 

Only 2 calls to the server in this case, instead of 12 and saves 3 Where-clauses on the clientside, since the server is much faster. You can also add CAML to filter through items

$query = "<View><Query><Where><Eq><FieldRef Name='ID' /><Value Type='Number'>123</Value></Eq></Where></Query></View>"

$SalesListItems = Get-SPOListItem -List "Sales list" -Query $query

Highlighted

@Kwok-Ho Lam wrote:

 

Only 2 calls to the server in this case, instead of 12 and saves 3 Where-clauses on the clientside, since the server is much faster. You can also add CAML to filter through items

$query = "<View><Query><Where><Eq><FieldRef Name='ID' /><Value Type='Number'>123</Value></Eq></Where></Query></View>"

$SalesListItems = Get-SPOListItem -List "Sales list" -Query $query


On the subject of using a query , Get-PnPListItem seems limited, if we want to bring the non default fieds.  Say I view all FIles in libraries and or Folders in  one or more Team Sites that were modified in the last month

 

$startDate = Get-Date "01/04/2017" 
$startDatestring = $startDate.ToString("yyyy-MM-ddTHH:mm:ssZ")
$endDate = Get-Date "01/05/2017"
$endDatestring = $endDate.ToString("yyyy-MM-ddTHH:mm:ssZ")

$query =   `
 "<View><Query><Where>  `
   <And> `
      <Geq> `
         <FieldRef Name='Modifed' /> <Value IncludeTimeValue='FALSE' `
          Type='DateTime'>" + $startDatestring + "</Value> `
      </Geq> `
      <Leq> `
        <FieldRef Name='Modifed' /> `
         <Value IncludeTimeValue='FALSE' Type='DateTime'>" + $endDatestring + "</Value> `
     </Leq> `
    </And> `
   </Where></Query></View>"

# THIS WON'T WORK AS YOU NEED -Fields "FileLeafRef", "Modified" IF YOU WANT TO GET THIS INCLUDED
# IN THE OUTPUT BUT THS MEANS -QUERY IS IGNORED Get-PnPListItem -List Document -Query $query -Web $locationWeb

If the above is not possible then it is back to bringing everything back....

 

Foreach($item in $items) {
write-host $item.Modified.ToString()
// check Modified date range here

}

Just seems not the quickest way to get the results I am looking for ;-( . Is the query with extended attributes something I should request?

Highlighted

@Pieter Veenstra

 

 

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

 

 

Highlighted

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

 

Highlighted

@Pieter Veenstra

 

Thanks , all I needed was to pipe the Select statement and then field nivarna .  Thanks again

 

 

Daniel