title: Variables in command when calling hashtable
body: <p>I'm trying to fetch a value from a hashtable like the one below.</p>
  
  <pre><code>$Hashtable1AuthTestID = @{ 
      "BID_XPI" = "(id 2)";
      "MBID_XPI" = "(id 3)";
      "T_XPI" = "(id 4)";
      "ST_XPI" = "(id 5)";
      "SI_XPI" = "(id 6)";
      "T_SAML" = "(id 7)";
      "ST_SAML" = "(id 8)";
      "SI_SAML" = "(id 9)";
      "BID_SAML" = "(id 10)";
      "MBID_SAML" = "(id 11)";
  }
  </code></pre>
  
  <p>It's working fine if I use <code>$Hashtable1AuthTestID.BID_XPI</code> but since this will be a generic script for several different type of data (and environments) I would like to include several variable when I call the hashtable such as the one below.</p>
  
  <pre><code># Without variables (Example): $Hashtable1AuthTestID.BID_XPI 
  # With variables (Example): $&lt;Hashtable&gt;&lt;Type&gt;&lt;Environment&gt;.&lt;Method&gt;
  
  $hashtable = "Hashtable1"
  $type = "Auth"
  $environment = "Test"
  $method = "BID_XPI"
  # ID is the example is a string.
  
  $'$hashtable1'$environment"ID".$method
  $$hashtable1$environment+"ID".$method
  </code></pre>
  
  <p>I've tested several different approaches but can't get it working. I do get the correct syntax (if I print the values from the variables) such as <code>$Hashtable1AuthTestID.BID_XPI</code> but I don't get the actual value from the hashtable ((id 2)).</p>