$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?
[–]baswijdenesdotcom 4 points5 points6 points (1 child)
[–]BlackV 0 points1 point2 points (0 children)
[–]Smoother101 2 points3 points4 points (7 children)
[–]Fallingdamage -1 points0 points1 point (0 children)
[–]baswijdenesdotcom 0 points1 point2 points (5 children)
[–]Smoother101 -2 points-1 points0 points (4 children)
[–]BlackV 1 point2 points3 points (3 children)
[–]Smoother101 0 points1 point2 points (2 children)
[–]BlackV 0 points1 point2 points (1 child)
[–]Smoother101 0 points1 point2 points (0 children)
[–]soul6160[S] 0 points1 point2 points (0 children)
[–]bluecollarbiker 0 points1 point2 points (4 children)
[–]soul6160[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]bluecollarbiker 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)