↓ Skip to main content
  1. Posts/

Connect quickly to a samba share from your freshly installed Windows PC

·117 words·1 min

You might need to access your networked Samba Share on a freshly installed Windows machine. If the Samba share doesn’t have WS-Discovery enabled, you might not see it even when you turn on Network Sharing. And might not be able to even map a shared drive. However, you can using the terminal instead. Here’s the two commands:

  1. Open Terminal.
  2. Run the following command, replacing the server name, share name, and username with your own:
    net use z: \\samba-server-name\samba-share /user:your-username-for-the-share *
  3. Enter the password when prompted. Then go to the Z: drive to access your share.
  4. The for copying of folders, you can use robocopy, /E copies subfolders and empty ones as well:
    robocopy "C:\source-folder" "z:\destination-folder" /E 

☀️

Sanjay Regmi
Author
Sanjay Regmi