I’ve got an array in the variable $a which contains the output from Get-AzureADDevice -all $true | select ObjectID
There are about 20 colums in the array and about 2000 rows. One of the rows contains an object ID whihc I can use to pipe to another command as follows Get-AzureADDeviceRegisteredUser -ObjectId
This Get-AzureADDeviceRegisteredUser -ObjectId returns a user.
All I get back is the user object ID and a username, however I need this information to correspond to the user ID in the initial Get-AzureADDevice.
How cal I append the object Id and username from the Get-AzureADDeviceRegisteredUser back into the $a variable which is the array created when I run Get-AzureADDevice
Is there a quick way to do this in PowerShell