Hello All
I am new to Powershell (currently worthing through the courses on Pluralsight to get my knowledge up to date)
I am trying to make a script that I can run that will pull data on enrolled devices in Intune.
The data I need to pull is Device ID, Device Name, and OS - I can do this using the below and it exports the data out to a CSV file for me.
Get-MgDeviceManagementManagedDevice | select-object id, deviceName, OperatingSystem | Export-csv -Path $csvFilePath
But I also need the data stored in Get-Computerinfo | select-object CsPCSystemType
So I can tell if its a laptop, or a desktop. But I don’t know how to run the 2 commands together and export all the data to 1 CSV file.
Would someone be able to advise what I am missing, please? or even if there is a better way to do this.
Many Thanks