Skip to content

Instantly share code, notes, and snippets.

@Techlogist
Created February 7, 2021 15:11
Show Gist options
  • Save Techlogist/5feca96b5f0046c45653171bd7902a12 to your computer and use it in GitHub Desktop.
Save Techlogist/5feca96b5f0046c45653171bd7902a12 to your computer and use it in GitHub Desktop.
How to map drives and folders with Powershell?
$New_Folder_Path="c:\Folderoo2"
$Share_Name="Name"
$Domain="Domain"
$USername="SamAccountname"
New-Item $New_Folder_Path –type directory
New-SMBShare –Name $Share_Name –Path $New_Folder_Path –FullAccess "$Domain\$USername"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment