As part of trying to release some files locked by a remote user over an automatic Windows hidden share (which I used to do via the Server control panel in NT4), I decided to skip doing a bulk
net file /cand did the nuclear option of doing
net share c$ /delete.
Aside from rebooting, what's the correct procedure to restore the share (preferably via the command line) ?
(The net is full of articles explaining that
net share admin$works implicitly and that there is a registry setting and that you reboot).
Bonus points for linking to a nice explanation of the best practice equivalents of
net sharein PowerShell