vagrant/plugins/hosts/windows/scripts/unset_share.ps1

11 lines
266 B
PowerShell
Raw Normal View History

2017-12-16 00:31:44 +00:00
ForEach ($share_name in $args) {
$result = net share $share_name /DELETE
if ($LastExitCode -ne 0) {
Write-Output "share name: ${share_name}"
Write-Error "error - ${result}"
exit 1
}
}
Write-Output "share removal completed"
exit 0