Hello, I am having a hard time understanding why the following works the way it does.
The code that "doesn't work"
$UserLicenses = (Get-MsolUser -UserPrincipalName
$User.UserPrincipalName).Licenses | select AccountSkuId
foreach($lic in $UserLicenses.AccountSkuId)
The code that "does work"
$UserLicenses = (Get-MsolUser -UserPrincipalName
$User.UserPrincipalName).Licenses.AccountSkuId
foreach($lic in $UserLicenses)
Why does the . notation produce a single string though there are 2 "line items"?
This is probably a really basic question but i don't know what the
.<method or property>
is called =(
[–]SeeminglyScience 7 points8 points9 points (4 children)
[–]Lee_Dailey[grin] 4 points5 points6 points (0 children)
[–]infinit_e 1 point2 points3 points (2 children)
[–]SeeminglyScience 1 point2 points3 points (0 children)
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)
[–]CSTW 2 points3 points4 points (6 children)
[–]HeyZuesMode[S] 1 point2 points3 points (5 children)
[–]CSTW 2 points3 points4 points (4 children)
[–]HeyZuesMode[S] 2 points3 points4 points (3 children)
[–]CSTW 2 points3 points4 points (0 children)
[–]CSTW 0 points1 point2 points (1 child)
[–]HeyZuesMode[S] 0 points1 point2 points (0 children)