title: Changing an array column name
body: <p>I have an array that contains <code>NotePoperties</code> that needs to be modified. When reading the array I need to do some code to figure out what the correct title for the array column should be. </p>
  
  <p>This code is ready and works fine:</p>
  
  <pre><code>$Permissions | Get-Member | ? MemberType -EQ NoteProperty | % {
      $Column = $Permissions.($_.Name)
      $GroupResult = Switch ($Column[1]) {
          'GROUP' {$Settings[0].Group  + ' '}
          ''      {break}
          Default {$group + ' '}
      }
      $SiteResult = Switch ($Column[0]) {
          'Site'  {$Settings[0].Code + ' '}
          ''      {break}
          Default {$site + ' '}
      }
      $Result = ($GroupResult + $SiteResult + $_.Name).Trim()
  }
  </code></pre>
  
  <p>What I'm now trying to do is update/modify the existing title with the generated <code>$Result</code> string from above:</p>
  
  <pre><code>$_.Name = $Result
  </code></pre>
  
  <p>When doing this, PowerShell throws the error <code>'Name' is a ReadOnly property.</code>.</p>
  
  <p>What is the best way of changing the title of the array? I also need to remove line 2 and line 3, but I can do that afterwards.</p>
  
  <p>Example of the <code>$Permissions</code> array where I'm trying to updated <code>Plant manager</code> to <code>Belgium Awesome Plant manager</code>:</p>
  
  <pre><code>Plant manager | Sales man | Warehouseman
  -------------- ----------  -------------
  Site          |           |
  Group         | Group     |
  Stuff         | Stuff     | Stuff
  </code></pre>
  
  <p>Thank you for your help.</p>