title: Cannot use variable with Get-User -Filter in Exchange Management Console
body: <p>I cannot seem to use variable in the situation below. </p>
  
  <pre><code>[PS] C:\&gt;Get-User -Filter {SamAccountName -eq "Test.Smith"}
  Name                                                        RecipientType
  ----                                                        -------------
  Test Smith                                                  UserMailbox
  
  [PS] C:\&gt;$SamAccountName = "Test.Smith"
  [PS] C:\&gt;Get-User -Filter {SamAccountName -eq $SamAccountName}
  [PS] C:\&gt;echo $SamAccountName
  Test.Smith
  [PS] C:\&gt;
  </code></pre>
  
  <p>You can see the command works fine when I type out the name, but not when I use a variable. Thanks!</p>