I tried to find a way to join or use variable into a command.
I'm trying to create a command that accept parameters:
The command: aduser.ps1 John
aduser.ps1 script:
Param($User)
Get-AdUser -filter 'Name -like "*$user*"'
I had error and not sure what operator to use to join in the $user variables, i tried + or & and not working for me.