On this page you can find a dump of PowerShell scripts I have written, that might save you some time. Feel free to use as you like.
Get all computers from Active Directory that have a LAPs password and output to CSV.
$Computers = Get-ADComputer -Filter * -Properties ms-Mcs-AdmPwd | where ms-Mcs-AdmPwd -ne $null
$Computers | Sort-Object Name | Select Name | Export-Csv -NoTypeInformation \\myserver\csv\laps.csv