et all site collection in a on-premise SharePoint 2016 farm with PNP PowerShell

%3CLINGO-SUB%20id%3D%22lingo-sub-132346%22%20slang%3D%22en-US%22%3Eet%20all%20site%20collection%20in%20a%20on-premise%20SharePoint%202016%20farm%20with%20PNP%20PowerShell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-132346%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20is%20it%20possible%20to%20get%20all%20site%20collection%20in%20a%20on-premise%20SharePoint%202016%20farm%20with%20PNP%20PowerShell%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%3C%2FP%3E%0A%3CP%3EStefan%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-295418%22%20slang%3D%22en-US%22%3ERe%3A%20et%20all%20site%20collection%20in%20a%20on-premise%20SharePoint%202016%20farm%20with%20PNP%20PowerShell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-295418%22%20slang%3D%22en-US%22%3Eworks%20great.!%20and%20it%20is%20security%20trimmed.%20%3A)%3C%2Fimg%3E%3CBR%20%2F%3E%3CBR%20%2F%3Ethanks%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-132622%22%20slang%3D%22en-US%22%3ERe%3A%20et%20all%20site%20collection%20in%20a%20on-premise%20SharePoint%202016%20farm%20with%20PNP%20PowerShell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-132622%22%20slang%3D%22en-US%22%3E%3CP%3EThere%20is%20one%20solution%20with%20serach%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%0A%3CDIV%3E%3CSPAN%3E%24%3C%2FSPAN%3E%3CSPAN%3Eresults%3C%2FSPAN%3E%20%3CSPAN%3E%3D%3C%2FSPAN%3E%20%3CSPAN%3ESubmit-PnPSearchQuery%3C%2FSPAN%3E%20%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3EQuery%20%3C%2FSPAN%3E%3CSPAN%3E%22ContentClass%3ASTS_Site%22%3C%2FSPAN%3E%20%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3ETrimDuplicates%3A%3C%2FSPAN%3E%3CSPAN%3E%24false%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%24%3C%2FSPAN%3E%3CSPAN%3Eurls%3C%2FSPAN%3E%20%3CSPAN%3E%3D%3C%2FSPAN%3E%20%3CSPAN%3E%24%3C%2FSPAN%3E%3CSPAN%3Eresults%3C%2FSPAN%3E%3CSPAN%3E.ResultRows%3C%2FSPAN%3E%20%3CSPAN%3E%7C%3C%2FSPAN%3E%20%3CSPAN%3EForEach-Object%3C%2FSPAN%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3CSPAN%3E%24%3C%2FSPAN%3E%3CSPAN%3E_%3C%2FSPAN%3E%3CSPAN%3E.SPWebUrl%3C%2FSPAN%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EVesa%20Juvonen%20was%20give%20me%20the%20hint%20to%20use%20the%20search.%20%26nbsp%3BThanks%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-132470%22%20slang%3D%22en-US%22%3ERe%3A%20et%20all%20site%20collection%20in%20a%20on-premise%20SharePoint%202016%20farm%20with%20PNP%20PowerShell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-132470%22%20slang%3D%22en-US%22%3EIt%20seems%20the%20answer%20is%20no...see%3A%20%3CA%20href%3D%22https%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Fpnp_powershell%2Fpnp-powershell-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Fpnp_powershell%2Fpnp-powershell-overview%3C%2FA%3E%3C%2FLINGO-BODY%3E
Highlighted
Regular Contributor

Hi, is it possible to get all site collection in a on-premise SharePoint 2016 farm with PNP PowerShell?

 

Thanks

Stefan

3 Replies
Highlighted

There is one solution with serach

 

$results = Submit-PnPSearchQuery -Query "ContentClass:STS_Site" -TrimDuplicates:$false
$urls = $results.ResultRows | ForEach-Object{$_.SPWebUrl}
 
Vesa Juvonen was give me the hint to use the search.  Thanks 
 
Highlighted
works great.! and it is security trimmed. :)

thanks