net use * /delete /y
By moving away from basic CMD and embracing PowerShell's logic, you gain a more stable, secure, and professional workflow for managing your network resources. cmd map network drive better
@echo off net use P: /delete >nul 2>&1 net use P: \\fileserver\projects\Shared /persistent:yes net use * /delete /y By moving away