PowerShell Logo Small

Remove-NfsShare



This is the built-in help made by Microsoft for the command 'Remove-NfsShare', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 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

Stops sharing NFS shares.

SYNTAX


Remove-NfsShare [-Name] <String[]> [[-NetworkName] <String[]>] [-AsJob] [-CimSession <CimSession[]>] [-PassThru] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf]
[<CommonParameters>]
Remove-NfsShare [-AsJob] [-CimSession <CimSession[]>] [-PassThru] [-ThrottleLimit <Int32>] -InputObject <CimInstance[]> [-Confirm] [-WhatIf] [<CommonParameters>]
Remove-NfsShare [-Path] <String[]> [[-NetworkName] <String[]>] [-AsJob] [-CimSession <CimSession[]>] [-PassThru] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf]
[<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Remove-NfsShare cmdlet stops sharing Network File System (NFS) shares. You can remove a share by using the share name or the share folder path. If the server belongs to
a server cluster, you must also specify the network name. You can use wildcards in the Name or Path parameter to delete multiple shares.


Users connected to a shared folder are disconnected when you stop sharing it. Users may lose data if you stop sharing a folder containing an open shared file without
warning. When possible, notify users before you stop sharing a folder.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?linkid=287500
Get-NfsShare
New-NfsShare
Set-NfsShare

REMARKS

<

Examples


Example 1: Remove an NFS share by using a name

PS C:\> Remove-NfsShare –Name "NFSshare01"
Are you sure you want to perform this action?
Performing operation "Remove Share" on Target "C:\shares\NFSshare01".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y



This command stops sharing the folder C:\shares\NFSshare01 named NFSshare01.




Example 2: Remove an NFS share by using a path

PS C:\> Remove-NfsShare -Path "C:\shares\NFSshare01"
Are you sure you want to perform this action?
Performing operation "Remove Share" on Target "C:\shares\NFSshare01".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y



This command stops sharing the folder that has the path C:\shares\NFSshare01.