Introduction
Windows network sharing allows you to access VPS files as if they were on your local PC.
This guide covers all the steps from folder creation to secure mounting on your computer, applying best practices to minimize risk.
Prerequisites
- Windows VPS (Server or Windows 10/11) accessible via RDP
- Administrator account on the VPS
- Local PC running Windows with admin rights
- Stable and secure network connection
- Windows Firewall enabled on the VPS
Creating the Folder to Share
- Connect to the VPS via RDP.
- Create a folder to share, for example:
C:\SharedData
- Right-click the folder → Properties → Security and Sharing.
- Ensure you are the owner of the folder and have full control.
Creating a Dedicated User for the Share
To secure the share, create a specific user:
# Create a new user
net user ShareUser StrongPasswordHere /add
# Add the user to the Users group (avoid Admin unless necessary)
net localgroup Users ShareUser /add
Tip: Use a strong, unique password.
Sharing the Folder and Setting Permissions
- Go to Properties → Sharing → Advanced Sharing.
- Check Share this folder and give it a simple name (
SharedData). - Click Permissions, add the created user (
ShareUser), and allowRead/Write. - In Properties → Security, verify that only authorized users have access.
- Remove
Everyoneto prevent unauthorized access.
Configuring Windows Firewall
Windows sharing uses SMB (TCP 445 and 139).
- Open PowerShell as Administrator and create a rule for your local PC:
New-NetFirewallRule -DisplayName "SMB - Local PC" -Direction Inbound -Protocol TCP -LocalPort 445,139 -RemoteAddress <PC_IP> -Action Allow
- Verify the rule is active:
Get-NetFirewallRule -DisplayName "SMB - Local PC"
Important: Never expose SMB to the public internet.
Enabling and Configuring SMB
- Check available SMB versions:
Get-SmbServerConfiguration | Select EnableSMB1Protocol, EnableSMB2Protocol
- Disable SMBv1 for security if possible:
Set-SmbServerConfiguration -EnableSMB1Protocol $false
- Keep SMBv2/3 active for modern and secure sharing.
Mounting the Network Drive on a Local PC
- On your local PC, open File Explorer → This PC → Map Network Drive.
- Choose a drive letter (e.g.,
Z:). - In the Folder field, enter the VPS address:
\\<VPS_IP>\SharedData
- Check Reconnect at sign-in if desired.
- Click Finish, then enter the credentials of
ShareUser.
Automatic Connection at Startup
To reconnect the network drive automatically:
- Create a batch file (.bat):
net use Z: \\<VPS_IP>\SharedData /user:ShareUser StrongPasswordHere /persistent:yes
- Place the batch file in the Startup folder on your PC.
Testing and Verification
- Access the network drive from your PC and create a test file.
- Check that changes appear correctly on the VPS.
- Test disconnect and reconnect to ensure persistence.
Security Best Practices
- Limit share access to a specific IP or via VPN.
- Use a dedicated user with a strong password.
- Enable SMB encryption (SMB 3.0).
- Monitor connection logs for unauthorized access attempts.
- Avoid sharing folders with sensitive data directly on the internet.
- Keep the Windows system up to date.


















