Question: Nowhere have I found anyone attempting to prompt for first and last names and then put that into a variable with a wildcard.

If I substitute real values with the asterisk, it works but attempting to do so with a variable returns nothing.

```
$LastName = Read-Host "Enter user's Last Name" 
$FirstName = Read-Host "Enter users's First Name" 

$GroupMembershipList = (Get-ADUser -Filter {(GivenName -like $FirstName*) -and (Surname -like $LastName*)}).SAMAccountName

Foreach ($Name in $GroupMembershipList) {

  $GroupMemberShip = Get-ADPrincipalGroupMembership -Identity "$Name" | Sort Name |ForEach-Object {$_.name -replace ".*:"} 
  $FullName = Get-ADUser $Name -Properties * | Select -Property DisplayName 
  $UserPrincipalName = Get-ADUser $Name -Properties * | Select -Property UserPrincipalName

  #Write-Output $PrincipalName
  Write-Output $FullName
  Write-Output $Name
  Write-Output $GroupMembership
  Write-Output " "

}

```

Answer: 
I think the issue is just that your braces are preventing your variables from expanding the way you expect them to. 

I offer this since `-Filter` will work with properly formatted strings as well.

```
$GroupMembershipList = Get-ADUser -Filter "GivenName -like '$FirstName*' -and Surname -like '$LastName*'" | Select-Object -ExpandProperty SamAccountName

```

and yes you can just get the property the same was you did before

```
$GroupMembershipList = (Get-ADUser -Filter "GivenName -like '$FirstName*' -and Surname -like '$LastName*'").SamAccountName

```
```
$GivenName = read-host "What's the users first name (wildcard * ok)?"
$Surname = read-host "What's the users last name (wildcard * ok)?"
Get-ADUser -filter{(Surname -like $Surname -and GivenName -like $GivenName)} -properties GivenName, Surname, UserPrincipalName, mobile

```