Use string interpolation like this:
$FoundOUs = Get-ADOrganizationalUnit -Filter "Name -like '$myOU'" -SearchBase="OU=Offices,DC=dc1,DC=domain,DC=com"
Note that string interpolation only happens with double quotes, so change the order of single and double quotes so that the variable is interpolated. In this case, the use of $($myOU) not required. You usually use a subexpression when you need to access a property, for example. $($myOU.Length) or generally evaluate the expression inside the string.
source share