PowerShell Logo Small

Close-SmbSession



This is the built-in help made by Microsoft for the command 'Close-SmbSession', in PowerShell version 3 - as retrieved from Windows version 'Microsoft Windows Server 2012 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Forcibly ends the Server Message Block (SMB) session.

SYNTAX


Close-SmbSession [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-Force [<SwitchParameter>]] [-PassThru [<SwitchParameter>]]
[-ThrottleLimit <Int32>] -InputObject <CimInstance[]> [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Close-SmbSession [[-SessionId] <UInt64[]>] [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-ClientComputerName <String[]>]
[-ClientUserName <String[]>] [-ClusterNodeName <String[]>] [-Force [<SwitchParameter>]] [-PassThru [<SwitchParameter>]] [-ScopeName
<String[]>] [-ThrottleLimit <Int32>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Close-SmbSession cmdlet forcibly ends the Server Message Block (SMB) session. Using this cmdlet may result in loss of data if the client
for which session is being stopped has not flushed all of the file modifications back to the server before the session is ended.



<

RELATED LINKS

Get-SmbSession

REMARKS

<

Examples


EXAMPLE 1

PS C:\> Close-SmbSession -SessionId 8813272891621
Confirm
Are you sure you want to perform this action?
Performing operation 'Close-Session' on Target '8813272891621'.
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): N



This example ends the SMB session.




EXAMPLE 2

PS C:\> Close-SmbSession -SessionId 8813272891621 -Force



This example ends the SMB session without user confirmation.