NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform.
You will still be able to view content, but posting and replying will be temporarily disabled.
To learn more, please review the information in this blog post.

ONTAP Rest API Discussions

How to check who has accessed a share and when

Sgoyal696
4,167 Views

Hi All.

I am looking for Netapp powershell cmdlets for - who has access a share and when did he access it.

for both 7 mode and c mode.

2 REPLIES 2

hmoubara
4,017 Views

Hello @Sgoyal696 

 

You can use the Get-NcCifsSession for both cluster and 7-mode to retrieve the list of the established CIFS sessions.

 

Per example:

 

PS C:\Users\Administrator.DEMO> Get-NcCifsSession

LifAddress SessionId ConnectionId ConnectedTime ProtocolVersion Address Vserver
---------- --------- ------------ ------------- --------------- ------- -------
x.x.x.x ...233245698 1955314432 2h 29m 51s smb3_1 y.y.y.y svm1
x.x.x.x ...235143682 4066832764 7m 47s smb3_1 y.y.y.y svm1

 

For additional info and parameter to use with the above command check :

 

PS C:\Users\Administrator.DEMO> Get-help Get-NcCifsSession -full

 

Thanks 

Sgoyal696
3,984 Views

Hi @hmoubara  I need to identify who accessed a share last time ( i.e 7 days ago, 10 days ago) not currnt established session.

For that i need powershell script or command.

Public