Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Getting value of specific property when there are multiple results in the output

$
0
0

Hello.  I am trying to get the value in the "IsDefault" for the "MethodType" of PhoneAppNotification. I am using the two line code below...

Text
$User = Get-MSolUser -UserPrincipalName name@domain.com
$User.StrongAuthenticationMethods | Select IsDefault,MethodType

To get the following output...

IsDefault     MethodType        
---------         ----------        
    False       OneWaySMS          
    False       TwoWayVoiceMobile  
    False       PhoneAppOTP        
    True        PhoneAppNotification

When there is more than one result outputted from the selection property entry, how can I target the specific "MethodType" to get the "isDefault" value?

Thanks.



Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>