title: Get-ADUser -Identity
body: <p>Unable to pass a variable to the Identity parameter in Powershell.</p>
  
  <pre><code>$username = "John.Doe"
  Get-ADUser -Identity "$username"
  </code></pre>
  
  <pre><code>Get-ADUser : Cannot find an object with identity: 'John.Doe' under: 'DC=contoso,DC=com'.
  At line:1 char:1
  + Get-ADUser -Identity "$username"
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (John.Doe:ADUser) [Get-ADUser], ADIdentityNotFoundException
      + FullyQualifiedErrorId : ActiveDirectoryCmdlet:Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException,M
     icrosoft.ActiveDirectory.Management.Commands.GetADUser
  </code></pre>
  
  <p>If I just put Get-ADUser -Identity "John.Doe" the results come back just fine.</p>