-
Notifications
You must be signed in to change notification settings - Fork 211
Description
Describe the bug
When I run: Get-MgSite -All -ExpandProperty Drive
All some properties are empty when using -All or -Top 10
$Sites[0].Drive
Name Id DriveType CreatedDateTime
But when running Get-MgSite -siteId <example site id> -ExpandProperty Drive
it works as expected:
$site.Drive
Name Id DriveType CreatedDateTime
OneDrive b!Pk2E5-ljkk<>DvB business 01/03/2025 02:30:31
Same behavior for other expanded properties like Analytics and CreatedByUser (not tested all)
Expected behavior
Expected same property output from calling by siteId as calling All.
How to reproduce
Execute $Sites = Get-MgSite -All -ExpandProperty Drive
Note none of the Drive attributes are populated.
SDK Version
2.26.1
Latest version known to work for scenario above?
No response
Known Workarounds
Can run a foreach-object loop to run the command individually but it takes a lot longer.
Debug output
Click to expand log
```</details>
### Configuration
Windows 11 x64
Name Value
---- -----
PSVersion 5.1.26100.2161
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.26100.2161
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
### Other information
_No response_