title: How to make a PSCustomObject with Nested Values
body: <p>I am trying to create a PSCustomObject with nested values and am having a really tough time,  I see plenty of examples of hash tables and pscustom objects but for only extremely basic sets of data.</p>
  
  <p>I am trying to create a a pscustom object that will have a server name property and then another property that has an array of services as well as their current running status. </p>
  
  <p>I was able to make a hash table of the services and their running status but when I try to make an object with the has table it doesnt work very well:</p>
  
  <p>hash table contains service names and their running status (stopped or running)</p>
  
  <pre><code>    $hashtable
  
      $myObject = [PSCustomObject]@{
      Name     = "$server"
      Services = "$hashtable"
      }
  </code></pre>
  
  <p>I am open to anything really, I have plenty of examples of how to convert items from JSON or XML and would love be able to use those as well but still having the same issue with being able to format the data in the first place.</p>
  
  <p>edit:  sorry about some of the vagueness of this post.  As some people have already mentioned, the problem was the double qoutes around the hashtable.  Everything is working now</p>