PowerShell Logo Small

Remove-SmbShare



This is the built-in help made by Microsoft for the command 'Remove-SmbShare', 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

Deletes the specified Server Message Block (SMB) shares.

SYNTAX


Remove-SmbShare [-Name] <String[]> [[-ScopeName] <String[]>] [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-Force
[<SwitchParameter>]] [-PassThru [<SwitchParameter>]] [-ThrottleLimit <Int32>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]
[<CommonParameters>]
Remove-SmbShare [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-Force [<SwitchParameter>]] [-PassThru [<SwitchParameter>]]
[-ThrottleLimit <Int32>] -InputObject <CimInstance[]> [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Remove-SMBShare cmdlet deletes one or more Server Message Block (SMB) shares.


Removing an SMB share forcibly disconnects all of the existing connections to the share. Use this cmdlet with caution. Clients that are
forcibly disconnected from a share will not have an opportunity to fluds/get-smbshare-psv3.php">Get-SmbShare
New-SmbShare
Set-SmbShare

REMARKS

<

Examples


EXAMPLE 1

PS C:\> Remove-SmbShare –Name Data
Confirm
Are you sure you want to perform this action?
Performing operation 'Remove-Share' on Target 'Contoso-FS,Data'.
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):



This example deletes the SMB share named Data.




EXAMPLE 2

PS C:\> Remove-SmbShare -Name VMFiles -ScopeName Contoso-SO -Force



This example deletes the SMB share named VMFiles without user confirmation.