Powershell Cd To Network Drive

When you work on networked computers, you will often need to access files on other machines. This can be done using the UNC path (\\server\share), but it can be difficult to remember the path for every file you need to access. A better solution is to map a network drive to a letter on your computer. This will make it easy to access the files on the networked machine.

To map a network drive in Powershell, you use the New-PSDrive cmdlet. The syntax is:

New-PSDrive -Name -PSProvider FileSystem -Root 

For example, to map a network drive named “Z:” to the …