How to remove windows default share?

Windows default share C$, D$ etc are recreated on machine restart or restarting the server service. To remove these share we can add a batch file which will remove the share. This batch file can be executed every time the machine is restarted by placing it in startup folder.

Create a batch file with following text

net share c$ /delete
net share d$ /delete

and save it as shareremove.bat(as an example). You can provide any name of your choice.

Copy this file in windows startup folder.

Now every time the machine is restarted the two shared drives c$ and D$ are removed from share.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.