Merge 2 arrays RRS feed

  • Question

  • Good morning,

    I've got an array in the variable $a which contains the output from Get-AzureADDevice -all $true | select ObjectID

    There are about 20 columns in the array and about 2000 rows.  One of the rows contains an object ID which I can use to pipe to another command as follows Get-AzureADDeviceRegisteredUser -ObjectId

    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 can 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?


    Alter De Ruine

    Saturday, May 23, 2020 9:12 AM

All replies