title: Add the value of a variable to a HashTable as the key
body: <p><strong>PowerShell V5 Windows 10</strong></p>
  
  <p>For example, the variable <code>$EmployeeID</code> contains the string <code>testValue</code>, and I want to simply use the value of the previous variable inside the <code>$HastTable.Add()</code> function. It would look like this:</p>
  
  <pre><code>$HashTable.Add($EmployeeID, 'some_value')
  </code></pre>
  
  <p><em>Except of course that does not work, but hopefully I am clear in what I want to achieve.</em></p>
  
  <p>With that, I can then access the value like I normally do:</p>
  
  <pre><code>$var = $HashTable.testValue
  </code></pre>