title: How can I set msTSInitialProgram in New-ADUser with PowerShell?
body: <p>I'm using a PowerShell script I found to add new AD users. It reads info from a CSV file, and everything works well, except that I need it to set the initial startup program for the new users. Here is the command:</p>
  
  <pre><code>New-ADUser $sam -GivenName $_.GivenName -DisplayName $_.DisplayName `
  -UserPrincipalName ($sam + "@" + $dnsroot) -AccountPassword $setpass -Enabled $enabled `
  -PasswordNeverExpires $expires -OtherAttributes @{'msTSInitialProgram'="programToRun"; 'msTSWorkDirectory'="directoryToRunIn"}
  </code></pre>
  
  <p>After looking at the user that is created, I see that it effectively ignores the <code>-OtherAttributes</code>.
  Am I missing an attribute somewhere that is causing it to skip setting the initial program?</p>