Cmd Command To Map Network Drive «SAFE»

net use * /delete You will be prompted: You have these remote connections: ... Continue with operation? (Y/N) . To suppress the prompt, pipe Y or use echo :

net use Z: "\\Server01\Project Files\Q1 Reports" You can explicitly specify the domain and even the domain controller: cmd command to map network drive

New-PSDrive -Name "Z" -PSProvider FileSystem -Root "\\Server01\Projects" -Persist The -Persist switch is equivalent to /persistent:yes in CMD. PowerShell also allows mapping using different credentials: net use * /delete You will be prompted: