New-PSDrive -Name "X" -PSProvider "FileSystem" -Root "\\Server01\Public" -Persist Use code with caution. Copied to clipboard
By default, drives mapped via CMD disappear when you log out. To ensure the drive reconnects automatically when you restart your PC, add the /persistent:yes flag: net use Z: \\ServerName\ShareName /persistent:yes Deleting a Mapped Drive To remove a drive when you're finished: net use Z: /delete 2. Mapping a Drive with PowerShell ( New-PSDrive ) map a network drive command line
New-PSDrive -Name "Z" -PSProvider FileSystem -Root "\\Server\Share" -Persist this time adding his admin credentials.
Z:\> net use * /delete
System error 53 has occurred. The network path was not found. map a network drive command line
He frowned. He pinged the IP. Four replies. The machine was alive. He tried again, this time adding his admin credentials.