Powershell - select email and login Skip to main content
https://support.okta.com/help/answers?id=9062a000000quseqak&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Jeff SwiftJeff Swift 

Powershell - select email and login

Is there a way to only select email and login from the profile object using powershell?  I'm trying to reconcile and this would be exceptionally helpful.

Below is a sample command
oktaGetUserbyID -oOrg prod -uid user.name@domain.com | Select-Object profile
Jeff SwiftJeff Swift
I believe I figured it out: 

oktaGetUserbyID -oOrg prod -uid user.name@domain.com | Select-Object -ExpandProperty profile | Select-Object login, email

I'm sure there is a more elegant way but this works for now.