I am little confused about why my little script I wrote is not having an output. In the beginning I have a read-host and unless I’m not understanding at all, I was under the impression that the $user variable will be filtered through until it matches a property. This seems to be a simple script yet I’m lost on why it is not working. Any help would be greatly appreciated.
Get-ADUser -filter {(Name -like “$user”) -or (SAMAccountName -like “$user”) -or (SN -like “$user”)} `
-Properties * | select Name, EmailAddress, SAMAccountName, SN | fl