<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PSTK: Select specific property value in General Discussion</title>
    <link>https://community.netapp.com/t5/General-Discussion/PSTK-Select-specific-property-value/m-p/169623#M1315</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can transform the version variable:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$ObjectProperties = $UriResponse | Select-Object -Property name,location,@{Label = "version"; expression = {$_.version.full}}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$ObjectProperties = $UriResponse | Select-Object -Property name,location,@{Label = "version"; expression = {$_.version.full}}
PS /home/rebelinux&amp;gt; 

PS /home/rebelinux&amp;gt; $ObjectProperties                                                                      
                                                    
                                                                                                                
name       location version    
----       -------- -------                                  
ONTAP-EDGE HomeLAb  NetApp Release 9.5P17: Wed May 12 20:42:52 UTC 2021
                
PS /home/rebelinux&amp;gt; &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
    <pubDate>Tue, 31 Aug 2021 16:51:42 GMT</pubDate>
    <dc:creator>jcolonfzenpr</dc:creator>
    <dc:date>2021-08-31T16:51:42Z</dc:date>
    <item>
      <title>PSTK: Select specific property value</title>
      <link>https://community.netapp.com/t5/General-Discussion/PSTK-Select-specific-property-value/m-p/169610#M1314</link>
      <description>&lt;P&gt;Hi, hope you can help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using REST API to pull back cluster properties in order to output to an Excel spreadsheet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Set URI variable for retrieving properties
[String]$Uri = "https://$HostIP/api/cluster?fields=**&amp;amp;return_records=true&amp;amp;return_timeout=15"

# Trigger REST API call and store in a variable
$UriResponse = Invoke-RestMethod -Method GET -Uri $Uri -Headers $Headers -ErrorAction Stop

# Select specific properties
$ObjectProperties = $UriResponse | Select-Object -Property name,location,version&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking at the $ObjectProperties variable, the 'name' and 'location' properties are in a format that I m happy with, however the 'version' property has a series of properties bundled into a hash table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;PS C:\windows\system32&amp;gt; $ObjectProperties

name         location    version                                                                                                                          
----         --------    -------                                                                                                                          
cluster_name room21      @{full=NetApp Release 9.8P3: Sat Mar 27 08:43:48 UTC 2021; generation=9; major=8; minor=0; name=h3bspprdm1; location=Cabinet P49}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to have the output in this format:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;name         location    version                                                                                                                          
----         --------    -------                                                                                                                          
cluster_name room21      NetApp Release 9.8P3: Sat Mar 27 08:43:48 UTC 2021&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help please?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 10:15:29 GMT</pubDate>
      <guid>https://community.netapp.com/t5/General-Discussion/PSTK-Select-specific-property-value/m-p/169610#M1314</guid>
      <dc:creator>tyrone_owen_1</dc:creator>
      <dc:date>2025-06-04T10:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: PSTK: Select specific property value</title>
      <link>https://community.netapp.com/t5/General-Discussion/PSTK-Select-specific-property-value/m-p/169623#M1315</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can transform the version variable:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$ObjectProperties = $UriResponse | Select-Object -Property name,location,@{Label = "version"; expression = {$_.version.full}}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$ObjectProperties = $UriResponse | Select-Object -Property name,location,@{Label = "version"; expression = {$_.version.full}}
PS /home/rebelinux&amp;gt; 

PS /home/rebelinux&amp;gt; $ObjectProperties                                                                      
                                                    
                                                                                                                
name       location version    
----       -------- -------                                  
ONTAP-EDGE HomeLAb  NetApp Release 9.5P17: Wed May 12 20:42:52 UTC 2021
                
PS /home/rebelinux&amp;gt; &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 16:51:42 GMT</pubDate>
      <guid>https://community.netapp.com/t5/General-Discussion/PSTK-Select-specific-property-value/m-p/169623#M1315</guid>
      <dc:creator>jcolonfzenpr</dc:creator>
      <dc:date>2021-08-31T16:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: PSTK: Select specific property value</title>
      <link>https://community.netapp.com/t5/General-Discussion/PSTK-Select-specific-property-value/m-p/169629#M1316</link>
      <description>&lt;P&gt;Thanks very much Jonathan, worked a treat&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 08:14:29 GMT</pubDate>
      <guid>https://community.netapp.com/t5/General-Discussion/PSTK-Select-specific-property-value/m-p/169629#M1316</guid>
      <dc:creator>tyrone_owen_1</dc:creator>
      <dc:date>2021-09-01T08:14:29Z</dc:date>
    </item>
  </channel>
</rss>

