• $Code = "GOL"

    This returns all the groups having "GOL" in their names:

    Get-QADGroup "*$Code*"

    This returns all the groups having _GOL_ in their names:

    Get-QADGroup "*`_$Code`_*"

    Both of these return nothing:

    Get-ADGroup -Filter {Name -like '*$Code*'}

    Get-ADGroup -Filter {(name -like "*$Code*")}