#CIFS Shares & Clients

1 messages · Page 1 of 1 (latest)

faint torrent
#

Hi, so I'm trying to find an easy way to match ConnectionIDs from the output of get-nccifssessions and get-nccifssessionsfile so I can easily identify which Windows clients are connecting to CIFS shares. Dumping that output to a CSV is a plus.

#

also if there is an easier way to get this data, I'm open to it as well!

supple wing
#

$Data= Get-NcCifsSession -Controller $SOM | Select-Object Address,shares,WindowsUser,ConnectionId,LifAddressmysq

then

if ((Get-NcCifsSessionFile | Where-Object ConnectionId -EQ $_.ConnectionId | select-object Share).count -gt 0 )

barren yarrow
#

Setup stuffs in a lab:

$PSVersionTable
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Find-Module NetApp.ONTAP | Install-Module -SkipPublisherCheck -AllowClobber
Get-module NetApp.ONTAP -ListAvailable | Import-Module
Connect-NcController -Name cluster2.demo.netapp.com
#

Some discovery

#
PS C:\Users\Administrator.DEMO> Get-NcCifsSession -Controller $Global:CurrentNcController
                                                                                 VVVVVVV <- This is the host
LifAddress          SessionId   ConnectionId    ConnectedTime ProtocolVersion    Address          Vserver
----------          ---------   ------------    ------------- ---------------    -------          -------
192.168.0.14176798722049     1732011656           3m 32s smb3_1             192.168.0.5      svm21

PS C:\Users\Administrator.DEMO> Get-NcCifsSession -Controller $Global:CurrentNcController | ForEach-Object {
>> Resolve-DnsName $_.Address}

Name                           Type   TTL   Section    NameHost
----                           ----   ---   -------    --------
5.0.168.192.in-addr.arpa.      PTR    1200  Question   JUMPHOST.demo.netapp.com

PS C:\Users\Administrator.DEMO>
#

Unless I'm misunderstanding, Get-NcCifsSession is already providing the host

torn bluff
faint torrent
#

I'll check it out but the cluster in question is still at 9.7 and has FAS8040 nodes. We're moving volumes off this thing.