To map a persistent network share with PowerShell, add the Persist parameter. The implication is that if I close my current PowerShell session, the mapping will be lost. In the examples above, the network drives mapped by PowerShell are NOT persistent. It will also display the details of the mapped drive. The drive will be mapped in the current PowerShell session. ![]() Once you have modified the command to meet your needs, to map the network drive, enter the command in PowerShell and press the enter key on your keyboard. However, you have to change the Root – path to your network share. You do not need to change the PSProvider – FileSystem is the PSProvider for folders. To map a network share, run a command similar to the one below: New-PSDrive -Name "N" -PSProvider "FileSystem" -Root "\\DESKTOP-SIAQMO1\Log Files" ![]() However, like most Windows tasks, you can map a network share with PowerShell.
0 Comments
Leave a Reply. |