Where-Object performs a filter test allowing only those objects through onto the next portion of the pipeline if the condition is true. Use Foreach-Object or Select-Object -ExpandProperty.
Get-ADUser -Filter {sAMAccountName -like "*"} |
Where-Object {$_.DistinguishedName -like "*Admins*"} |
Select-Object -ExpandProperty sAMAccountName
Get-ADUser -Filter {sAMAccountName -like "*"} |
Where-Object {$_.DistinguishedName -like "*Admins*"} |
Foreach-Object -Process {$_.sAMAccountName}
If the Set-ADAccountPassword takes the -Identity parameter by pipeline then you could probably do this:
Get-ADUser -Filter {sAMAccountName -like "*"} |
Where-Object {$_.DistinguishedName -like "*Admins*"} |
Select-Object -ExpandProperty sAMAccountName |
Set-ADAccountPassword -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "Password123" -Force)
If it can't then perhaps you should use Foreach-Object.
Get-ADUser -Filter {sAMAccountName -like "*"} |
Where-Object {$_.DistinguishedName -like "*Admins*"} |
Foreach-Object -Process {
Set-ADAccountPassword -Identity $_.sAMAccountName -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "Password123" -Force)
}