SCRT-HQ / PSGSuite

Powershell module for Google / G Suite API calls wrapped in handy functions. Authentication is established using a service account via P12 key to negate the consent popup and allow for greater handsoff automation capabilities
https://psgsuite.io/
Apache License 2.0
235 stars 67 forks source link

Get-GSChromeOSDevice returning weird data #349

Closed gmorrow3 closed 3 years ago

gmorrow3 commented 3 years ago

Describe the bug when running Get-GSChromeOSDevice much of the data is correct, there are various bits that return "Google.Apis.Admin.Directory.directory_v1.Data.ChromeOsDevice+" and whatever the field name is: Google.Apis.Admin.Directory.directory_v1.Data.ChromeOsDevice+RecentUsersData instead of the data that is in that place.

To Reproduce Steps to reproduce the behavior:

  1. Run Get-GSChromeOSDevice
  2. See data

Expected behavior I expect to see the proper data in these fields Maybe I set something up incorrectly, or maybe I'm just stupid (that is highly likely)

Screenshots image

Environment (please complete the following information):

Buenno commented 3 years ago

Hi,

You need to use -ExpandProperty in Select-Object in order to expand the nested objects.

gmorrow3 commented 3 years ago

Hi,

You need to use -ExpandProperty in Select-Object in order to expand the nested objects.

Ah! I see now, working as expected when formatted properly... Thank you very much!