< Back

Uninstall-CFileShare

Sun Jan 12, 2020 11:39 pm

NAME Uninstall-CFileShare



SYNOPSIS

Uninstalls/removes a file share from the local computer.





SYNTAX

Uninstall-CFileShare [-Name] <String> [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

The `Uninstall-CFileShare` function uses WMI to uninstall/remove a file share from the local computer, if it

exists. If the file shares does not exist, no errors are written and nothing happens. The directory on the file

system the share points to is not removed.



`Uninstall-CFileShare` was added in Carbon 2.0.





PARAMETERS

-Name <String>

The name of a specific share to uninstall/delete. Wildcards accepted. If the string contains WMI sensitive

characters, you'll need to escape them.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

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, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Uninstall-CFileShare -Name 'CarbonShare'



Demonstrates how to uninstall/remove a share from the local computer. If the share does not exist,

`Uninstall-CFileShare` silently does nothing (i.e. it doesn't write an error).











RELATED LINKS

Get-CFileShare

Get-CFileSharePermission

Install-CFileShare

Test-CFileShare