I have tried the following
get-msoldevice -name $CHGList | Select-Object ObjectID | Export-CSV -Path "C:\Users\username\desktop\AzureDeviceID.csv"
I have tried piping over results and running it that way
I've looked at trying to loop through the CSV file and it's making no sense.
Can I get some help?
Thanks all for your time.
What does your CSV look like? Even if it's a single property, you need to reference that property when passing the values to other things. For example, if the column in the CSV was named "DeviceName", you would do:
Get-MsolDevice -Name $CHGList.DeviceName | Select-Object -Property ObjectID | Export-CSV -Path "C:\Users\username\desktop\AzureDeviceID.csv"
What results do you get when you do this?
get-msoldevice -name $CHGList | Select-Object ObjectID
Have you tried this?
$chglist | get-msoldevice | select objectid
You must be logged in to reply to this topic.