Data ONTAP® PowerShell Toolkit

Switch to Data ONTAP 7-mode documentation.

Cmdlet: Get-NcCifsSession


NAME
Get-NcCifsSession

SYNOPSIS
Retrieve the list of the established CIFS sessions.

SYNTAX
Get-NcCifsSession [[-SessionId] <String[]>] [[-Node] <String[]>] [[-Vserver]
<String[]>] [-Attributes <CifsSession>] [-VserverContext <String>] [-Contro
ller <NcController[]>] [<CommonParameters>]

Get-NcCifsSession -Template [-VserverContext <String>] [-Controller <NcContr
oller[]>] [<CommonParameters>]

Get-NcCifsSession -Query <CifsSession> [-Attributes <CifsSession>] [-Vserver
Context <String>] [-Controller <NcController[]>] [<CommonParameters>]


DESCRIPTION
Retrieve the list of the established CIFS sessions.


PARAMETERS
-SessionId <String[]>
One or more unique identifiers for the session. Data ONTAP wildcards ar
e permitted.

Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Node <String[]>
The name of one or more nodes on which the session listing is done. Dat
a ONTAP wildcards are permitted.

Required? false
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Vserver <String[]>
Restrict the results to one or more Vservers. Data ONTAP wildcards are
permitted.

Required? false
Position? 3
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Attributes <CifsSession>
For improved scalability in large clusters, provide a CifsSession object
with various fields set to indicate which fields to return on all objec
ts. Undesired fields should remain set to null. Use "Get-NcCifsSession
-Template" to get the initially empty CifsSession object. If not speci
fied, all data is returned for each object.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-VserverContext <String>
Vserver to which to direct this command. If the currently connected con
troller (as embodied by an NcController object) represents a cluster, th
ere are multiple means to address commands to one of its vservers. Eith
er set the Vserver field on the NcController object to direct all subseq
uent commands to that vserver, or supply the VserverContext parameter to
an individual cmdlet. Only cmdlets which may be invoked on vservers of
fer the VserverContext parameter.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Controller <NcController[]>
A clustered Data ONTAP controller to receive this cmdlet, as embodied by
an NcController object. This parameter is returned by the Connect-NcCo
ntroller cmdlet. If not specified, the value in the global variable Cur
rentNcController is used. In the latter case, if CurrentNcController co
ntains a collection of NcController objects, this cmdlet is invoked on e
ach controller in succession.

Required? false
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-Template
Specify to get an empty CifsSession object for use with advanced queries
involving the Query attribute.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Query <CifsSession>
For advanced queries, provide a CifsSession object with various fields s
et to indicate which records to retrieve. Other fields should remain se
t to null. Use "Get-NcCifsSession -Template" to get the initially empty
CifsSession object.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
DataONTAP.C.Types.Cifs.CifsSession


NOTES


Category: cifs
API: cifs-session-get-iter
Family: cluster, vserver

-------------- Example 1 --------------

C:\PS>Get-NcCifsSession


Get all cifs sessions on the current cluster.


Address : 10.58.94.227
AuthMechanism : ntlmv2
ConnectedTime : 6d 0h 28m 35s
ConnectionId : 248115481
ContinuouslyAvailable : yes
Files : 3
IdleTime : 3s
LifAddress : 10.58.92.109
NcController : 10.58.95.206
Node : Varuna-02
Other : 0
ProtocolVersion : smb3
SessionId : 1
Shares : 1
UnixUser : pcuser
Vserver : no_odx
WindowsUser : SEA-TM\MMSHYPER-V02$
ConnectionIdSpecified : True
FilesSpecified : True
OtherSpecified : True
SessionIdSpecified : True
SharesSpecified : True


-------------- Example 2 --------------

C:\PS>$q = Get-NcCifsSession -Template
$q.ProtocolVersion = 'smb3'
Get-NcCifsSession -Query $q


Get all SMB3 CIFS sessions.


LifAddress SessionId ConnectionId ConnectedTime ProtocolVersio
n Address Vserver
---------- --------- ------------ ------------- --------------
- ------- -------
10.58.92.109 1 248115481 6d 0h 30m 50s smb3
10.58.94.227 no_odx
10.58.92.109 1 248115473 6d 0h 30m 54s smb3
10.58.94.227 no_odx
10.58.92.105 1 363597761 6d 0h 30m 46s smb3
10.58.94.227 vsMMS



RELATED LINKS
Get-NcCifsSessionFile







 Data ONTAP® PowerShell Toolkit