You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$domain = Get-ADDomain | Select-Object DistinguishedName #Get the DN name for your domain controller
$computers = Get-ADComputer -SearchBase $domain.DistinguishedName -Filter * -Properties ComputerName #Grabs the names of all the computers in the domain
foreach ($computer in $computers){ #Loops through each computer and checks if it has a LAPS password set. If it does it will be displayed in the console