Uninstalls/removes a file share from the local computer.
Uninstall-FileShare [-Name] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
Uninstall-FileShare 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-FileShare was added in Carbon 2.0.
The name of a specific share to uninstall/delete. Wildcards accepted. If the string contains WMI sensitive characters, you'll need to escape them.
|This cmdlet supports common parameters. For more information type
Uninstall-FileShare -Name 'CarbonShare'
Demonstrates how to uninstall/remove a share from the local computer. If the share does not exist,
Uninstall-FileShare silently does nothing (i.e. it doesn't write an error).