r/PowerShell • u/That_Hospital_3224 • Oct 12 '26
Question Getting machine id
I have an excel spreadsheet with our users. I need to extract the laptop they use. So I need the hostage and os version from intune. I have asked co pilot but I keep running into errors. Does anyone have a solution/working script or know a free app that can generate the information?
5
Upvotes
20
u/Podrick_Targaryen Oct 12 '26
"So I need the hostage" ummm...Where do you work?
14
u/WearyDeluge Oct 12 '26
Install Graph PowerShell Module, connect, and run: Get-MgDeviceManagementManagedDevice -All | Select-Object DeviceName, OperatingSystem, OSVersion, ComplianceState, UserPrincipalName | Export-CSV "./the/path/you/want" -Notypeinformation
2
u/That_Hospital_3224 Oct 13 '26
Thank you all for the help. I think I've managed it
18
u/LBik Oct 12 '26
> So I need the hostage
These days, doesn't Oracle provide its own?
7
u/Overall-Ad4796 Oct 12 '26
always felt like Intune keeps the devices hostage.
5
u/BlackV Oct 12 '26
Show us your code, show us your errors it's easier to help
1
u/UserProv_Minotaur Oct 13 '26
Do you not have an ITAM suite?