[BUG?] Get-PnPTenantSite not returning correct information when getting multiple sites #2454
Unanswered
PTI-AKapsch
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to get information on our OneDrive sites, and I'm running into some issues with both the PnP module and the Microsoft SharePoint module. I'm starting to think this is a SharePoint problem, and I'm not sure if I can trust the results I am receiving anymore from either module. I created a Reddit post in r/SharePoint sharing my experiences with the Microsoft SPO module to see if anyone had the same experience, but wanted to check here if anyone is having the same issue with the PnP module. Here is the link to that Reddit post: https://www.reddit.com/r/sharepoint/comments/xps9pu/sharepoint_powershell_getsposite_result_bug/
Issue:
Get-PnPTenantSite seems to be returning default values (False and 0) for properties instead of nothing when getting more than one site at a time (For example, when using a filter).
How to reproduce:
Start by getting your OneDrive sites and setting them to the $Sites variable:
$Sites = Get-PnPTenantSite -IncludeOneDriveSites -Filter "Url -like '-my.sharepoint.com/personal/'"
Then print the results and see that ExternalUserExpirationInDays is 0 and OverrideTenantExternalUserExpirationPolicy is False:
Expected results:
If I run the following command and print the results, I get what I would expect from Get-PnPTenantSite. Note how I have Get-PnPTenantSite inline to get the site results individually, which returns the expected values:
Beta Was this translation helpful? Give feedback.
All reactions