命令行强制删除 net share

net share "unc" /delete 有时候会碰到 Users have open files on unc.  Continuing the op

net share "unc" /delete 有时候会碰到

Users have open files on unc.  Continuing the operation will force the files closed.

Do you want to continue this operation? (Y/N) [N]:

 

echo Y | net share "unc" /delete 不行,会报:

No valid response was provided.

 

需要用到

net share "unc" /delete /y