Skip to content

Latest commit

 

History

History
41 lines (40 loc) · 817 Bytes

Map Network Drive.md

File metadata and controls

41 lines (40 loc) · 817 Bytes

Using PSDrive in PowerShell

get-help about_providers

  • No seperate credentials needed
New-PSDrive -Name "X" -PSProvider FileSystem -Root $network_path
  • with seperate credentials
$cred = get-credential
New-PSDrive -Name "X" -PSProvider FileSystem -Root $network_path -credential $cred
  • View Mapped Drive
get-psdrive
get-psdrive -provider FileSystem
  • Disconnect drive
remove-psdrive x:

Using Net Use CMD

LINK: Net use

  • Using current logged on cred
net use x: \\server\share
  • using seperate credential
net use x: \\server\share /user:contoso\user
  • View Network Drive
net use
  • To disconnect share
net use x: /delete