<?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: Needs Help for CIFS open files in PowerShell in ONTAP Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Discussions/Needs-Help-for-CIFS-open-files-in-PowerShell/m-p/168164#M38531</link>
    <description>&lt;P&gt;Hi Donny_Lang,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, we're only getting back a shorted output of the open files using Get-NcCifsSession - over the last run there were just about 4 thousand out of a total of 57 thousand.&lt;/P&gt;&lt;P&gt;Do you have (or anyone has) any idea what could be the reason for this and how we might get the problem solved?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;BR /&gt;Andreas&lt;/P&gt;</description>
    <pubDate>Wed, 30 Jun 2021 05:53:29 GMT</pubDate>
    <dc:creator>BayernMunich</dc:creator>
    <dc:date>2021-06-30T05:53:29Z</dc:date>
    <item>
      <title>Needs Help for CIFS open files in PowerShell</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Needs-Help-for-CIFS-open-files-in-PowerShell/m-p/164169#M37573</link>
      <description>&lt;P&gt;Hello Everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a script file to get a list of CIFS open file through the PowerShell tool and the main reason of creating this script is our helpdesk team wants to see who left a file open and ask him to close it. We don't wanna use the MMC feature since it provides some unwanted access for helpdesk team.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the following context and it's working but it generates an output of all SVMs and I wanna be more specific . So, I like to provide an ability for helpdesk team to input a desire SVM name or&amp;nbsp; Windows User or path. this file will be exported to a csv file to facilitate searching purpose.&lt;/P&gt;&lt;P&gt;Connect-NcController "Controller Name"&lt;BR /&gt;Add-NcCredential&lt;BR /&gt;Get-NcCifsSessionFile | %{&lt;BR /&gt;$session = Get-NcCifsSession -SessionId $_.SessionId&lt;/P&gt;&lt;P&gt;$data = "" | Select "WindowsUser", "SVM", "Path"&lt;BR /&gt;$data.WindowsUser = $session.WindowsUser&lt;BR /&gt;$data.SVM = $_.Vserver&lt;BR /&gt;#$data.SVM =&lt;BR /&gt;$data.Path = "\\$($session.LifAddress)\$($_.Share)\$($_.Path)"&lt;/P&gt;&lt;P&gt;$data&lt;BR /&gt;}&amp;nbsp; |&amp;nbsp;Export-Csv -Path "c:\cifs.csv"&amp;nbsp; -UseCulture -NoTypeInformation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 10:34:20 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Needs-Help-for-CIFS-open-files-in-PowerShell/m-p/164169#M37573</guid>
      <dc:creator>Moh_Kouhi</dc:creator>
      <dc:date>2025-06-04T10:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Needs Help for CIFS open files in PowerShell</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Needs-Help-for-CIFS-open-files-in-PowerShell/m-p/164222#M37580</link>
      <description>&lt;P&gt;For filtering by a specific SVM, you could use Read-Host to accept input from the person running the script, store it as a variable, and then use the variable in the -Vserver parameter of the Get-NcCifsSessionFile cmdlet.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For user/path, there isn't a cmdlet parameter that will accept those values, but you could collect the data using Get-NcCifsSession like you have in your code now, and then filter by user/path by piping Get-NcCifsSession to Where-Object to only show relevant data.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 18:57:53 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Needs-Help-for-CIFS-open-files-in-PowerShell/m-p/164222#M37580</guid>
      <dc:creator>donny_lang</dc:creator>
      <dc:date>2021-02-22T18:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: Needs Help for CIFS open files in PowerShell</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Needs-Help-for-CIFS-open-files-in-PowerShell/m-p/168164#M38531</link>
      <description>&lt;P&gt;Hi Donny_Lang,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, we're only getting back a shorted output of the open files using Get-NcCifsSession - over the last run there were just about 4 thousand out of a total of 57 thousand.&lt;/P&gt;&lt;P&gt;Do you have (or anyone has) any idea what could be the reason for this and how we might get the problem solved?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;BR /&gt;Andreas&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 05:53:29 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Needs-Help-for-CIFS-open-files-in-PowerShell/m-p/168164#M38531</guid>
      <dc:creator>BayernMunich</dc:creator>
      <dc:date>2021-06-30T05:53:29Z</dc:date>
    </item>
  </channel>
</rss>

