Select-Object help

Leonard Gilbert 146 Reputation points
2024-02-26T15:31:52.92+00:00

Need some help figuring out how to properly do a select-object from graph powershell. I'm assuming because of the response headers it is throwing off the standard | Select-Object -ExpandProperty 2024-02-26_9-21-08

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 61,111 Reputation points
    2024-02-26T15:55:59.3366667+00:00

    Since Get-MgBetaUser is already selecting the properties you want do you really need to filter the properties in Select-Object? Since UserPrincipalName is just a string try using Select-Object -Property UserPrincipalName instead.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.