New-SMBMapping vs. New-PSDrive

powershell-logoThis’ll be an expanding topic I suspect …

New-SMBMapping (link)

Seems to be the Microsoft’s preferred method.

Mapped network drive may fail to reconnect in Windows 10, version 1809

-UseWriteThrough is an option (Server 2019 & Windows 10 1809)
Overview of file sharing using the SMB 3 protocol in Windows Server
Controlling write-through behaviors in SMB

The Microsoft Desired State Resource Kit now uses it.
DSC Resource Kit Release January 2017

Mounting SAMBA drives from within Windows Nano server may need it.
Mounting Samba Shares inside Nano Server

Map drives on the fly with mandated signing or encryption

Windows versions 1709 and later went a bit further and allow you to create encrypted or signed mapped drives on the fly from the command-line. While this is outside the reach of the average user, it’s a great option for logon scripts and admins.
Solution: Map drives that require signing or encryption. You can use the NET USE command or New-SmbMapping PowerShell cmdlet to map drives by specifying “RequireIntegrity” (signing) or “RequirePrivacy” (encryption).


New-PSDrive (link)

Establishes an SMB connection at the highest SMB dilect (ie. if SMB 3.1.1 is on the server, it’ll connect at that level)

Has a -Force parameter which allows you to overwrite existing drive mappings.

Remove-PSDrive does not work correctly for Networked Drives created using -persist and -scope Global

Further References

Mapping Drives Revisited