<?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: Get list of Filers from DFM to run PS commands against in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-list-of-Filers-from-DFM-to-run-PS-commands-against/m-p/34957#M1605</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the coming days I will be releasing tons of my oncommand scripts.. I just haven't decided how to release them to the community.... But we do exactly this.. and we separate it based on group, so I can query via DFM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a script to do this, but I will repost to a blog shortly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;#&lt;BR /&gt;.SYNOPSIS&lt;BR /&gt;&amp;nbsp; Queries all DFM controllers&lt;BR /&gt;.DESCRIPTION&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; .EXAMPLE&lt;BR /&gt;&amp;nbsp; .\dfm_controller_dump_wgroup.ps1&lt;BR /&gt;.DATE &lt;BR /&gt;&amp;nbsp; 4-15-2013&lt;BR /&gt;.Version &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v1&lt;BR /&gt;.Notes&lt;BR /&gt;&amp;nbsp; .Author &lt;BR /&gt;&amp;nbsp;&amp;nbsp; Josh Goldfarb &lt;BR /&gt;.Change Log&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v1.0 - Initial&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cls&lt;BR /&gt;write-host "`t`t`t`t`tDFM Controller Dump is running.&amp;nbsp; Do not close window..........." -fore Red -background black&lt;BR /&gt;$dfmcontrollers = dfm controller list&lt;/P&gt;&lt;P&gt;$globalarray=@()&lt;BR /&gt;$dfmcontrollers | % {&lt;BR /&gt;if ($_ -like "*controller*" -and $_ -like "*filernodeb*") {&lt;/P&gt;&lt;P&gt;$var = $_.trim()&lt;BR /&gt;$array = $var -replace '\s+', " "&lt;BR /&gt;$array = $array.split(" ")&lt;BR /&gt;## Build Array with Controllers&lt;BR /&gt;$controller = $array[2]&lt;BR /&gt;} elseif ($_ -like "*controller*") {&lt;BR /&gt;$var = $_.trim()&lt;BR /&gt;$array = $var -replace '\s+', " "&lt;BR /&gt;$array = $array.split(" ")&lt;BR /&gt;## Build Array with Controllers&lt;BR /&gt;$controller = $array[3]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;$customobject = new-object psobject&lt;BR /&gt;Add-Member -inputobject $customobject -membertype Noteproperty -name Filer -value $controller&lt;/P&gt;&lt;P&gt;$globalarray += $customobject&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;## Remove null variables&lt;/P&gt;&lt;P&gt;$globalarray = $globalarray | ? {$_.filer -ne $null}&lt;BR /&gt;## Export Events&lt;BR /&gt;#$globalarray | export-csv c:\temp\dfmfilers.csv -notypeinformation&lt;/P&gt;&lt;P&gt;$dfmfilers = @()&lt;BR /&gt;$globalarray | % {&lt;BR /&gt;$filer = $_.filer &lt;/P&gt;&lt;P&gt;## Get group information for Filer&lt;BR /&gt;$custom = new-object psobject&lt;BR /&gt;Add-Member -inputobject $custom -membertype Noteproperty -name Filer -value $filer&lt;/P&gt;&lt;P&gt;$group = dfm group list $filer&lt;BR /&gt;$group[2] | % {&lt;BR /&gt;$var = $_.trim()&lt;BR /&gt;$var = $var -replace '\s+', " "&lt;BR /&gt;$var = $var.split(" ")&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if ($var.count -eq 3) {&lt;/P&gt;&lt;P&gt;$groupname = $var[1] + " " + $var[2]&lt;/P&gt;&lt;P&gt;} else {&lt;BR /&gt;$groupname = $var[1]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Add-Member -inputobject $custom -membertype Noteproperty -name Purpose -value $groupname&lt;BR /&gt;$dfmfilers += $custom&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;$dfmfilers = $dfmfilers | ? {$_.filer -ne $Null}&lt;BR /&gt;## Export filers&lt;BR /&gt;$dfmfilers | Sort Purpose,Filer |&amp;nbsp; export-csv c:\temp\dfmfilers.csv -notypeinformation&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;## Copy file to httproot$ dump share for scripting&lt;BR /&gt;Copy-item c:\temp\dfmfilers.csv "&lt;A&gt;\\netappinfo\httproot$\dfmfilers.csv&lt;/A&gt;" -force&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;cls&lt;BR /&gt;write-host "`t`t`t`t`tDFM Controller dump complete.........." -fore Red -background black&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;####&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then when I write script, I can do it off groups,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$host&amp;nbsp; = import-csv dfmfiler.csv | ? {$_.purpose -eq "vmware"} &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;stuff like that..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 30 Jun 2013 13:25:46 GMT</pubDate>
    <dc:creator>JGPSHNTAP</dc:creator>
    <dc:date>2013-06-30T13:25:46Z</dc:date>
    <item>
      <title>Get list of Filers from DFM to run PS commands against</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-list-of-Filers-from-DFM-to-run-PS-commands-against/m-p/34948#M1603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to get a list of Filers from our DFM server (Oncommand Core 5.1) so that I can loop through them and then run powershell commands against them.&lt;/P&gt;&lt;P&gt;I want to do this so that I don't have to maintain a list of Filers in a text File and I know the list is up to date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found you can get a list of the Filers from report view as XML or CSV from DFM using the url:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H1 style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;A href="http://{dfm-server}:8080/dfm/report/filers-ops?output-format=xls" title="http://{dfm-server}:8080/dfm/report/filers-ops?output-format=xls" target="_blank"&gt;https://{dfm-server}:8443/dfm/report/filers-ops?output-format=csv&lt;/A&gt;&lt;/SPAN&gt;&lt;/H1&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I tried using Powershell:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"&gt;System.Net.Webclient&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;and &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Invoke-WebRequest&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;but the issue I have is it returns nothing as I'm not logged in.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Has anyone managed to get a list of Filers from DFM to run Powershell commands against?&amp;nbsp; The only other way I can think of is to run Powershell &lt;/SPAN&gt;remotely&lt;SPAN style="font-size: 10pt;"&gt; on the DFM server with something like "dfm host list"&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 05:59:21 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-list-of-Filers-from-DFM-to-run-PS-commands-against/m-p/34948#M1603</guid>
      <dc:creator>MARTINLEGGATT</dc:creator>
      <dc:date>2025-06-05T05:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Get list of Filers from DFM to run PS commands against</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-list-of-Filers-from-DFM-to-run-PS-commands-against/m-p/34954#M1604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;'dfm host list' will give you a list that is unreadable by PS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the closest you can get to that is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dfm report create -R controller -f name filers&lt;/P&gt;&lt;P&gt;dfm report view filers &amp;gt;&amp;gt; c:\filers.txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS &amp;gt; Get-Content -Path c:\filers.txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the only problem is the first 2 lines - the file will look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;volume name&lt;/P&gt;&lt;P&gt;---------------------&lt;/P&gt;&lt;P&gt;filer01&lt;/P&gt;&lt;P&gt;filer02&lt;/P&gt;&lt;P&gt;filer03&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Jun 2013 23:03:28 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-list-of-Filers-from-DFM-to-run-PS-commands-against/m-p/34954#M1604</guid>
      <dc:creator>JSHACHER11</dc:creator>
      <dc:date>2013-06-29T23:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Get list of Filers from DFM to run PS commands against</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-list-of-Filers-from-DFM-to-run-PS-commands-against/m-p/34957#M1605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the coming days I will be releasing tons of my oncommand scripts.. I just haven't decided how to release them to the community.... But we do exactly this.. and we separate it based on group, so I can query via DFM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a script to do this, but I will repost to a blog shortly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;#&lt;BR /&gt;.SYNOPSIS&lt;BR /&gt;&amp;nbsp; Queries all DFM controllers&lt;BR /&gt;.DESCRIPTION&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; .EXAMPLE&lt;BR /&gt;&amp;nbsp; .\dfm_controller_dump_wgroup.ps1&lt;BR /&gt;.DATE &lt;BR /&gt;&amp;nbsp; 4-15-2013&lt;BR /&gt;.Version &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v1&lt;BR /&gt;.Notes&lt;BR /&gt;&amp;nbsp; .Author &lt;BR /&gt;&amp;nbsp;&amp;nbsp; Josh Goldfarb &lt;BR /&gt;.Change Log&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v1.0 - Initial&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cls&lt;BR /&gt;write-host "`t`t`t`t`tDFM Controller Dump is running.&amp;nbsp; Do not close window..........." -fore Red -background black&lt;BR /&gt;$dfmcontrollers = dfm controller list&lt;/P&gt;&lt;P&gt;$globalarray=@()&lt;BR /&gt;$dfmcontrollers | % {&lt;BR /&gt;if ($_ -like "*controller*" -and $_ -like "*filernodeb*") {&lt;/P&gt;&lt;P&gt;$var = $_.trim()&lt;BR /&gt;$array = $var -replace '\s+', " "&lt;BR /&gt;$array = $array.split(" ")&lt;BR /&gt;## Build Array with Controllers&lt;BR /&gt;$controller = $array[2]&lt;BR /&gt;} elseif ($_ -like "*controller*") {&lt;BR /&gt;$var = $_.trim()&lt;BR /&gt;$array = $var -replace '\s+', " "&lt;BR /&gt;$array = $array.split(" ")&lt;BR /&gt;## Build Array with Controllers&lt;BR /&gt;$controller = $array[3]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;$customobject = new-object psobject&lt;BR /&gt;Add-Member -inputobject $customobject -membertype Noteproperty -name Filer -value $controller&lt;/P&gt;&lt;P&gt;$globalarray += $customobject&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;## Remove null variables&lt;/P&gt;&lt;P&gt;$globalarray = $globalarray | ? {$_.filer -ne $null}&lt;BR /&gt;## Export Events&lt;BR /&gt;#$globalarray | export-csv c:\temp\dfmfilers.csv -notypeinformation&lt;/P&gt;&lt;P&gt;$dfmfilers = @()&lt;BR /&gt;$globalarray | % {&lt;BR /&gt;$filer = $_.filer &lt;/P&gt;&lt;P&gt;## Get group information for Filer&lt;BR /&gt;$custom = new-object psobject&lt;BR /&gt;Add-Member -inputobject $custom -membertype Noteproperty -name Filer -value $filer&lt;/P&gt;&lt;P&gt;$group = dfm group list $filer&lt;BR /&gt;$group[2] | % {&lt;BR /&gt;$var = $_.trim()&lt;BR /&gt;$var = $var -replace '\s+', " "&lt;BR /&gt;$var = $var.split(" ")&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if ($var.count -eq 3) {&lt;/P&gt;&lt;P&gt;$groupname = $var[1] + " " + $var[2]&lt;/P&gt;&lt;P&gt;} else {&lt;BR /&gt;$groupname = $var[1]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Add-Member -inputobject $custom -membertype Noteproperty -name Purpose -value $groupname&lt;BR /&gt;$dfmfilers += $custom&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;$dfmfilers = $dfmfilers | ? {$_.filer -ne $Null}&lt;BR /&gt;## Export filers&lt;BR /&gt;$dfmfilers | Sort Purpose,Filer |&amp;nbsp; export-csv c:\temp\dfmfilers.csv -notypeinformation&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;## Copy file to httproot$ dump share for scripting&lt;BR /&gt;Copy-item c:\temp\dfmfilers.csv "&lt;A&gt;\\netappinfo\httproot$\dfmfilers.csv&lt;/A&gt;" -force&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;cls&lt;BR /&gt;write-host "`t`t`t`t`tDFM Controller dump complete.........." -fore Red -background black&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;####&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then when I write script, I can do it off groups,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$host&amp;nbsp; = import-csv dfmfiler.csv | ? {$_.purpose -eq "vmware"} &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;stuff like that..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Jun 2013 13:25:46 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-list-of-Filers-from-DFM-to-run-PS-commands-against/m-p/34957#M1605</guid>
      <dc:creator>JGPSHNTAP</dc:creator>
      <dc:date>2013-06-30T13:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: Get list of Filers from DFM to run PS commands against</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-list-of-Filers-from-DFM-to-run-PS-commands-against/m-p/34967#M1606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the PS code. I also noticed the thread you started which is along a very similar line of what I am trying to do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.netapp.com/thread/20462" title="https://communities.netapp.com/thread/20462" target="_blank"&gt;https://communities.netapp.com/thread/20462&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be good if Netapp created DFM cmdlets but this works which is great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jul 2013 13:39:59 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-list-of-Filers-from-DFM-to-run-PS-commands-against/m-p/34967#M1606</guid>
      <dc:creator>MARTINLEGGATT</dc:creator>
      <dc:date>2013-07-04T13:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Get list of Filers from DFM to run PS commands against</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-list-of-Filers-from-DFM-to-run-PS-commands-against/m-p/34972#M1607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I rely on "dfm report" over dfm host list, and the same applies for "dfm report view volumes" over "dfm volume list $controller" for this type of output.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"dfm report view controllers" will get a list of controllers, and if you group controllers(by region, type, etc) within DFM, then you can run the same report against that group, as well as run commands against the group(for rolling out an option change, for example).&amp;nbsp; You can also make the output more manageable by making the output format in csv by typing something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dfm report view -F csv controller&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then each column will be delimited by a comma, so you can use the split function to filter the output by doing something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dfm report view -F csv controller | select-string fas6240 | %{$_.tostring().split(",")[3]}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will show you the hostname of every fas6240 known to your DFM server and obviously you can get ONTAP ver, sysid, etc through other reports or canned reports. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2013 19:22:45 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-list-of-Filers-from-DFM-to-run-PS-commands-against/m-p/34972#M1607</guid>
      <dc:creator>rmatsumoto</dc:creator>
      <dc:date>2013-08-01T19:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get list of Filers from DFM to run PS commands against</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-list-of-Filers-from-DFM-to-run-PS-commands-against/m-p/34977#M1608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ah, i didn't even think to do that.. nice.. I can switch my code to that and addd the group..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2013 19:29:44 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-list-of-Filers-from-DFM-to-run-PS-commands-against/m-p/34977#M1608</guid>
      <dc:creator>JGPSHNTAP</dc:creator>
      <dc:date>2013-08-01T19:29:44Z</dc:date>
    </item>
  </channel>
</rss>

