Merge pull request #10524 from chrisroberts/e-share-unset

Automatically answer yes when pruning SMB shares
This commit is contained in:
Chris Roberts 2018-12-19 12:37:41 -08:00 committed by GitHub
commit 4873d7879a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1,5 +1,5 @@
ForEach ($share_name in $args) {
$result = net share $share_name /DELETE
$result = net share $share_name /DELETE /YES
if ($LastExitCode -ne 0) {
Write-Output "share name: ${share_name}"
Write-Error "error - ${result}"