title: Use a variable returned by Get-Variable
body: <p>Hopefully this answer isn't above me. I've created a custom object with properties and methods.  I create several of them on the fly, depending on what the user selects at the beginning.</p>
  
  <p>So for this example, the script might create $PRD1, $PRD2, $TST1 and $TST4.</p>
  
  <p>$PRD1, $PRD2, $TST1 and $TST4 will have some properties like DebugMode, DisableAppsStartTime, DisableAppsStopTime.  They'll have some methods like DisableApps(), EnableApps().</p>
  
  <p>How can I find out which variables the script ended up creating?  I can use Get-Variable to know the ones it created (plus I DO still have the initial list of names to create).  My issue is that I'm having trouble figuring out to call the ones I've created, in a manner that allows me to use the methods and properties, without a ridiculous mash up of nested foreach/if/switch commands.</p>
  
  <p>I certainly hope that made sense.</p>
  
  <p>Thanks in advance,
  SS</p>