7/24/2023 0 Comments Reinstall netdrive![]() ![]() Copy NetworkDriveMap.ps1 file to %SystemDrive%\Scripts\. Write-Host "There was an error mapping $MappedDrive.RemotePath to $MappedDrive.LocalPath" New-SmbMapping -LocalPath $MappedDrive.LocalPath -RemotePath $MappedDrive.RemotePath -Persistent $True $MappedDrives = Get-SmbMapping |where -property Status -Value Unavailable -EQ | select LocalPath,RemotePath Copy and paste the following command into another notepad, save and name it as NetworkDriveMap.ps1. Put the notepad file NetworkDriveMap.cmd into this location: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp. PowerShell -File "%SystemDrive%\Scripts\MapDrives.ps1" > "%TEMP%\StartupLog.txt" 2>
0 Comments
Leave a Reply. |