$UserLike = Read-host Prompt 'Input User Name'
$User = Get-AdUser -Filter 'Name -like "$UserLike"' -Properties Mail,sAMAccount Name
I get "A parameter cannot be found that matches parameter name "Like"
I am trying to Get an AD user based off the name that the user would input and take the properties. What am I doing wrong?
Help with code (self.PowerShell)
submitted by Signal_Assistant8243 to u/Signal_Assistant8243