# Access Network Location – PowerShell

In order to access a network location in PowerShell, we need to temporary map it to a drive locally, which we can then use as a reference for our further operation.

For ex, here, I want to copy a SharePoint package from a shared network location to my local machine.

```If (!(Test-Path Z:))
{
write-host "Attempting to map network drive, Z:" -foregroundcolor Magenta

\$map = new-object -ComObject WScript.Network