title: Update AD tsprofilepath and append string to variable in path name
body: <p>I need to bulk update the “terminalservicesprofilepath” attribute for several ad user objects and append a variable + string at the end of the path.  So far this is what I have, which fails miserably.</p>
  
  <pre><code>$users = (gc C:\Scripts\users.txt |%{get-aduser $_ })
  FOREACH ($user in $users){
  $profiledir = $user + ".DOMAIN.V2"
  $x = [ADSI]”LDAP://$($user.DistinguishedName)”
  $x.psbase.invokeset(“terminalservicesprofilepath”,”\\Fileserver\tsprofile\$profiledir”)
  }
  </code></pre>