title: Using a Powershell noteproperty as a text string in a variable
body: <p>I've used Invoke-Restmethod to download some data, which Powershell stores in a PSCustomObject, in a property called data.</p>
  
  <p>I need to use the value of one of the items in the returned data as a variable for another command. I have managed to select-object -expand my way down to the following output from Get-Member:</p>
  
  <pre><code>Name        MemberType   Definition                    
  ----        ----------   ----------                    
  Equals      Method       bool Equals(System.Object obj)
  GetHashCode Method       int GetHashCode()             
  GetType     Method       type GetType()                
  ToString    Method       string ToString()             
  id          NoteProperty System.Int32 id=999 
  </code></pre>
  
  <p>What I need to do is grab the value of the ID noteproperty - 999 - and pass that as part of a string to a new variable, eg:</p>
  
  <pre><code>$newVar = "sometext" + 999 + "moretext"
  </code></pre>
  
  <p>No amount of select-string or out-string etc is helping. Scripting is not exactly my strong point so I'm not sure I'm even articulating what I want properly - apologies if this is the case!</p>
  
  <p>Any assistance much appreciated</p>