title: Create PowerShell PSObject in C# cmdlet
body: <p>New to C# but experienced in PowerShell. Taking over someone else's code. Writing a compiled PowerShell module, and trying to figure out how to create an object based on returned data. Right now, code returns a string:</p>
  
  <pre><code>ServerResponse&lt;UCCSiteModel&gt; requestModel = this.MakeRequest("/site/api/", "site", "GET", this.Credentials, queryString);
  StringBuilder builder = new StringBuilder();
  
  if (requestModel != null &amp;&amp; requestModel.Response != null)
  {
      builder.AppendLine("SiteID: " + requestModel.Response.SiteID);
      builder.AppendLine("Identity: " + requestModel.Response.SiteName);
      builder.AppendLine("Site Code: " + requestModel.Response.SiteCode);
      builder.AppendLine("Contact Name: " + requestModel.Response.ContactName);
      builder.AppendLine("Contact Number: " + requestModel.Response.ContactNumber);
      builder.AppendLine("Contact Email Address: " + requestModel.Response.ContactEmailAddress);
      builder.AppendLine("Address: " + requestModel.Response.Address);
      builder.AppendLine("City: " + requestModel.Response.City);
      builder.AppendLine("State: " + requestModel.Response.State);
      builder.AppendLine("Post Code: " + requestModel.Response.PostCode);
      builder.AppendLine("Time Zone: " + requestModel.Response.Timezone);
      builder.AppendLine("Longitude: " + requestModel.Response.longitude);
      builder.AppendLine("Latitude: " + requestModel.Response.latitude);                    
      this.WriteResponse(requestModel, builder.ToString());
  }
  </code></pre>
  
  <p>How do I create an object from <code>requestModel.Response</code> to send back to PowerShell instead of the string? When writing PowerShell, I would normally use <code>New-Object PsObject</code>, and then <code>Add-Member</code>. Not sure how to do that in C#, or what it's called (so I can search). Anyone?</p>