Use the following syntax:

Enter the following command: New-PSDrive -Name "Z" -PSProvider FileSystem -Root "\\ServerName\FolderName" -Persist

SMB Support: Some older NAS devices require SMB 1.0 support, which is disabled by default in Windows 11 for security. You can enable this in "Turn Windows features on or off," though it is generally safer to update your hardware. How to Disconnect a Mapped Drive