Using Select-Object in a script moves on before Select-Object is done

32 Views Asked by At

With this code:

Get-ADUser -Filter {samaccountname -like "jsmith*"} | select samaccountname
Read-Host "what's up"

Why does my output always ask "what's up" before giving me the list of AD Users?
The issue only occurs if I use select.

0

There are 0 best solutions below