Map a Drive to a Shared Folder on the Same Domain
net use Z: \\ServerName\SharedFolder
This is the most common command you'll use to map a shared folder to a drive letter, like `Z:`. It's perfect for accessing shared resources within your own domain. Once you run it, you’ll have easy access to that folder just by going to `Z:` in File Explorer. I use this all the time when I need to access my department's shared folders.
Map a Drive Using Domain Credentials
net use Z: \\ServerName\SharedFolder /user:Domain\Username Password
If you need to access a shared folder and the system requires credentials, this is your go-to. You specify your domain username and password, which is great for when you're working with a secure shared folder. It saves time compared to manually entering the credentials each time.
Map a Drive with No Persistence (Temporary Mapping)
net use Z: \\ServerName\SharedFolder /persistent:no
This command is useful when you need temporary access. The folder will be mapped, but the connection won’t automatically reconnect after a reboot. I use this when I just need to access a resource for a few hours, and I don't want to have to manually disconnect it later.
Map a Drive Using an IP Address
net use Z: \\192.168.1.100\SharedFolder
Sometimes, the server name isn't resolving properly, or you just want to use the IP directly. This is where using the IP address instead of the hostname comes in handy. I prefer it when I’m troubleshooting or when DNS is acting weird and the server name isn’t working.
Map a Drive to a Different Domain
net use Z: \\OtherDomainServer\SharedFolder /user:OtherDomain\Username Password
If you’re working across domains, this command allows you to connect using credentials from another domain. You just need to specify the domain and username from that different domain. I use this when I need to access resources on a partner’s domain or when I'm working on a cross-domain project.
Map a Drive with Saved Credentials
net use Z: \\ServerName\SharedFolder /user:Domain\Username Password /savecred
This command stores your credentials for future use, so you don’t need to enter them every time. This is awesome for when you’re frequently accessing the same shared resources. I use it to save myself from typing out my username and password multiple times throughout the day.
Disconnect a Mapped Drive
net use Z: /delete
When you're done with a mapped drive and want to disconnect it, this command is the easiest way to go. It removes the mapped drive, freeing up that letter for something else. It’s nice to use if you’ve mapped something temporarily or if a mapped drive is no longer needed.
Disconnect All Mapped Drives
net use * /delete
This command clears all mapped drives in one shot. Instead of disconnecting each drive individually, you can use the asterisk `*` to remove them all. I’ve used this in scripts or when I need to quickly reset all network connections.
Map a Network Drive from a Workgroup Machine
net use Z: \\WorkgroupPC\SharedFolder /user:WorkgroupUsername Password
If you're working in a workgroup setup and need to connect to another machine, this command will help. You’ll use the local username and password of the target workgroup machine. It’s a must if you're in a smaller network or don't have a domain controller.
Map a Printer to a Port
net use LPT1: \\PrinterServer\PrinterName
This is the command for mapping a printer over the network. It connects the printer to the `LPT1:` port, making it accessible just like any local printer. I use this when I need to print to a shared network printer from my PC.
Map a Drive with Domain Credentials and Persistence
net use Z: \\ServerName\SharedFolder /user:Domain\Username Password /persistent:yes
With `/persistent:yes`, the drive will reconnect every time you log in. This is useful for network drives you need access to all the time. It makes your work much smoother since you won’t have to manually remap the drive every time you restart.
Map a Drive Using a Local Account on a Domain-Joined Server
net use Z: \\DomainServer\SharedFolder /user:LocalUser Password
If you’re working with a domain-joined server but need to authenticate with a local user account, this is the command. It’s especially useful when you don’t have domain credentials but still need to access the server. I use this when I’m managing machines that use a local account for certain tasks.
Map a Drive from a Domain to a Workgroup
net use Z: \\WorkgroupServer\SharedFolder /user:WorkgroupUser Password
If you're in a domain and need to access a resource from a workgroup, this command lets you use local credentials from that workgroup server. It’s helpful in hybrid setups where not all machines are domain-joined. I’ve used it a lot when I’m in the office but need to access someone’s home network.
Map a Drive to a Specific Folder
net use Z: \\ServerName\Folder\Subfolder /user:Domain\Username Password
This allows you to be specific when accessing a folder within a shared directory. Instead of mapping the entire share, you can specify the exact folder. It’s great when there’s a lot of data in a share, and you only need a specific section.
Map a Drive Using Workgroup Credentials
net use Z: \\WorkgroupPC\SharedFolder /user:WorkgroupUser Password
If you're on a workgroup machine and need to access another workgroup resource, you’ll use this command. You authenticate with a local user credential, which is pretty straightforward when you're not in a domain. I use this a lot in home lab environments or smaller networks.
Map a Drive Using an IP Address with Workgroup Credentials
net use Z: \\192.168.1.101\SharedFolder /user:WorkgroupUser Password
This command maps a folder via its IP address while using workgroup credentials. It’s especially useful when DNS isn’t working, or the network is a bit messy. I use it when I need a quick connection and the server name just doesn’t want to resolve.
Map a Drive to a Network Resource Outside the Domain
net use Z: \\ExternalServer\SharedFolder /user:ExternalDomain\Username Password
If you’re accessing a shared folder on a machine that’s outside your domain, you’ll use this command. You need to provide the external domain credentials, allowing you to access that server’s resources. I’ve used this when connecting to partner organizations or cloud resources.
Map a Drive Using Saved Credentials for External Domain
net use Z: \\ExternalServer\SharedFolder /user:ExternalDomain\Username Password /savecred
This is a great way to map a drive with credentials from an external domain and not have to keep typing them. Once saved, it will remember the credentials, which is useful if you’re working on external servers frequently. It saves a ton of time.
Map a Drive to a Network Printer (Remote)
net use LPT1: \\RemoteServer\PrinterName
This is the same concept as mapping a printer locally, but you’re accessing it remotely. It’s ideal when you need to print documents from a remote server. I use this when I'm troubleshooting issues on a server and need to print logs or reports while away from the office.
Map a Drive to a Shared Folder on Another Workgroup PC
net use Z: \\WorkgroupPC\SharedFolder /user:LocalUsername Password
If you’re working on a machine that’s part of a workgroup, you’ll authenticate with a local user to access resources. This is ideal when you're connecting to a non-domain machine but need to access shared files. I’ve used this command many times on non-domain home office setups.
Map a Drive to a Folder Using Different Credentials on the Same Domain
net use Z: \\ServerName\SharedFolder /user:Domain\DifferentUser Password
Sometimes you need to use a different set of credentials to access resources on a server in your own domain. This command allows you to specify another username within the same domain. It’s useful when you’re performing tasks on behalf of someone else or need access to different permissions.
Map a Drive to a Shared Folder Using IP Address (No Domain Credentials)
net use Z: \\192.168.1.100\SharedFolder
In some cases, you might not have a domain account or don’t need it. You can map a network drive by directly using the IP address of the server. I use this when I need to access a shared folder quickly and don't need to worry about domain login.
Map a Drive to a Shared Folder on a Remote Domain-Joined Server
net use Z: \\RemoteDomainServer\SharedFolder /user:RemoteDomain\Username Password
When accessing a shared folder on a remote server that’s domain-joined, you use this to authenticate with credentials from the remote domain. I’ve used this in cross-office scenarios or when working on projects where resources are stored on a server located in a different location.
Map a Drive with a Different User from the Same Domain
net use Z: \\ServerName\SharedFolder /user:Domain\DifferentUser Password
If you need to access a shared folder but with different credentials (say, for an administrative task), this command lets you authenticate with that user’s credentials. I’ve found it useful when performing admin-level tasks or accessing restricted resources.
Connect to a Network Resource Outside the Domain Using Workgroup Credentials
net use Z: \\OtherWorkgroupPC\SharedFolder /user:WorkgroupUser Password
If you're outside your domain and need to access a workgroup share, you can authenticate using a workgroup username and password. This comes in handy when you're managing or troubleshooting other devices that aren’t part of the domain. I’ve used it when accessing a colleague's machine in a different workgroup.
Map a Drive from a Workgroup Machine to a Domain Server
net use Z: \\DomainServer\SharedFolder /user:Domain\Username Password
This allows you to map a network drive from a workgroup to a domain-joined server. You simply authenticate using domain credentials. I use this command when I'm on a workgroup machine but need to access resources stored on a domain-joined server.
Map a Drive to a Shared Folder Using Different Domain Credentials
net use Z: \\ServerName\SharedFolder /user:OtherDomain\Username Password
When connecting to a server in a different domain, this command lets you specify the external domain’s credentials. It’s super helpful if you’re working in a multi-domain environment. I use this whenever I’m working on cross-domain projects and need access to shared resources.
Map a Drive to a Shared Folder and Set It to Reconnect Automatically
net use Z: \\ServerName\SharedFolder /persistent:yes
This is perfect when you need the network drive to reconnect automatically after a reboot. It’s great for any resource you regularly need to access. Once the command runs, you won’t need to remap the drive the next time you log in.
Are you trying to map a drive for backups? Then you should have a look at BackupChain, an excellent network backup software for Windows.
Also, did you know that you can map a drive to S3, FTP, and SFTP storage? You can't do that with net use, instead use DriveMaker.
net use Z: \\ServerName\SharedFolder
This is the most common command you'll use to map a shared folder to a drive letter, like `Z:`. It's perfect for accessing shared resources within your own domain. Once you run it, you’ll have easy access to that folder just by going to `Z:` in File Explorer. I use this all the time when I need to access my department's shared folders.
Map a Drive Using Domain Credentials
net use Z: \\ServerName\SharedFolder /user:Domain\Username Password
If you need to access a shared folder and the system requires credentials, this is your go-to. You specify your domain username and password, which is great for when you're working with a secure shared folder. It saves time compared to manually entering the credentials each time.
Map a Drive with No Persistence (Temporary Mapping)
net use Z: \\ServerName\SharedFolder /persistent:no
This command is useful when you need temporary access. The folder will be mapped, but the connection won’t automatically reconnect after a reboot. I use this when I just need to access a resource for a few hours, and I don't want to have to manually disconnect it later.
Map a Drive Using an IP Address
net use Z: \\192.168.1.100\SharedFolder
Sometimes, the server name isn't resolving properly, or you just want to use the IP directly. This is where using the IP address instead of the hostname comes in handy. I prefer it when I’m troubleshooting or when DNS is acting weird and the server name isn’t working.
Map a Drive to a Different Domain
net use Z: \\OtherDomainServer\SharedFolder /user:OtherDomain\Username Password
If you’re working across domains, this command allows you to connect using credentials from another domain. You just need to specify the domain and username from that different domain. I use this when I need to access resources on a partner’s domain or when I'm working on a cross-domain project.
Map a Drive with Saved Credentials
net use Z: \\ServerName\SharedFolder /user:Domain\Username Password /savecred
This command stores your credentials for future use, so you don’t need to enter them every time. This is awesome for when you’re frequently accessing the same shared resources. I use it to save myself from typing out my username and password multiple times throughout the day.
Disconnect a Mapped Drive
net use Z: /delete
When you're done with a mapped drive and want to disconnect it, this command is the easiest way to go. It removes the mapped drive, freeing up that letter for something else. It’s nice to use if you’ve mapped something temporarily or if a mapped drive is no longer needed.
Disconnect All Mapped Drives
net use * /delete
This command clears all mapped drives in one shot. Instead of disconnecting each drive individually, you can use the asterisk `*` to remove them all. I’ve used this in scripts or when I need to quickly reset all network connections.
Map a Network Drive from a Workgroup Machine
net use Z: \\WorkgroupPC\SharedFolder /user:WorkgroupUsername Password
If you're working in a workgroup setup and need to connect to another machine, this command will help. You’ll use the local username and password of the target workgroup machine. It’s a must if you're in a smaller network or don't have a domain controller.
Map a Printer to a Port
net use LPT1: \\PrinterServer\PrinterName
This is the command for mapping a printer over the network. It connects the printer to the `LPT1:` port, making it accessible just like any local printer. I use this when I need to print to a shared network printer from my PC.
Map a Drive with Domain Credentials and Persistence
net use Z: \\ServerName\SharedFolder /user:Domain\Username Password /persistent:yes
With `/persistent:yes`, the drive will reconnect every time you log in. This is useful for network drives you need access to all the time. It makes your work much smoother since you won’t have to manually remap the drive every time you restart.
Map a Drive Using a Local Account on a Domain-Joined Server
net use Z: \\DomainServer\SharedFolder /user:LocalUser Password
If you’re working with a domain-joined server but need to authenticate with a local user account, this is the command. It’s especially useful when you don’t have domain credentials but still need to access the server. I use this when I’m managing machines that use a local account for certain tasks.
Map a Drive from a Domain to a Workgroup
net use Z: \\WorkgroupServer\SharedFolder /user:WorkgroupUser Password
If you're in a domain and need to access a resource from a workgroup, this command lets you use local credentials from that workgroup server. It’s helpful in hybrid setups where not all machines are domain-joined. I’ve used it a lot when I’m in the office but need to access someone’s home network.
Map a Drive to a Specific Folder
net use Z: \\ServerName\Folder\Subfolder /user:Domain\Username Password
This allows you to be specific when accessing a folder within a shared directory. Instead of mapping the entire share, you can specify the exact folder. It’s great when there’s a lot of data in a share, and you only need a specific section.
Map a Drive Using Workgroup Credentials
net use Z: \\WorkgroupPC\SharedFolder /user:WorkgroupUser Password
If you're on a workgroup machine and need to access another workgroup resource, you’ll use this command. You authenticate with a local user credential, which is pretty straightforward when you're not in a domain. I use this a lot in home lab environments or smaller networks.
Map a Drive Using an IP Address with Workgroup Credentials
net use Z: \\192.168.1.101\SharedFolder /user:WorkgroupUser Password
This command maps a folder via its IP address while using workgroup credentials. It’s especially useful when DNS isn’t working, or the network is a bit messy. I use it when I need a quick connection and the server name just doesn’t want to resolve.
Map a Drive to a Network Resource Outside the Domain
net use Z: \\ExternalServer\SharedFolder /user:ExternalDomain\Username Password
If you’re accessing a shared folder on a machine that’s outside your domain, you’ll use this command. You need to provide the external domain credentials, allowing you to access that server’s resources. I’ve used this when connecting to partner organizations or cloud resources.
Map a Drive Using Saved Credentials for External Domain
net use Z: \\ExternalServer\SharedFolder /user:ExternalDomain\Username Password /savecred
This is a great way to map a drive with credentials from an external domain and not have to keep typing them. Once saved, it will remember the credentials, which is useful if you’re working on external servers frequently. It saves a ton of time.
Map a Drive to a Network Printer (Remote)
net use LPT1: \\RemoteServer\PrinterName
This is the same concept as mapping a printer locally, but you’re accessing it remotely. It’s ideal when you need to print documents from a remote server. I use this when I'm troubleshooting issues on a server and need to print logs or reports while away from the office.
Map a Drive to a Shared Folder on Another Workgroup PC
net use Z: \\WorkgroupPC\SharedFolder /user:LocalUsername Password
If you’re working on a machine that’s part of a workgroup, you’ll authenticate with a local user to access resources. This is ideal when you're connecting to a non-domain machine but need to access shared files. I’ve used this command many times on non-domain home office setups.
Map a Drive to a Folder Using Different Credentials on the Same Domain
net use Z: \\ServerName\SharedFolder /user:Domain\DifferentUser Password
Sometimes you need to use a different set of credentials to access resources on a server in your own domain. This command allows you to specify another username within the same domain. It’s useful when you’re performing tasks on behalf of someone else or need access to different permissions.
Map a Drive to a Shared Folder Using IP Address (No Domain Credentials)
net use Z: \\192.168.1.100\SharedFolder
In some cases, you might not have a domain account or don’t need it. You can map a network drive by directly using the IP address of the server. I use this when I need to access a shared folder quickly and don't need to worry about domain login.
Map a Drive to a Shared Folder on a Remote Domain-Joined Server
net use Z: \\RemoteDomainServer\SharedFolder /user:RemoteDomain\Username Password
When accessing a shared folder on a remote server that’s domain-joined, you use this to authenticate with credentials from the remote domain. I’ve used this in cross-office scenarios or when working on projects where resources are stored on a server located in a different location.
Map a Drive with a Different User from the Same Domain
net use Z: \\ServerName\SharedFolder /user:Domain\DifferentUser Password
If you need to access a shared folder but with different credentials (say, for an administrative task), this command lets you authenticate with that user’s credentials. I’ve found it useful when performing admin-level tasks or accessing restricted resources.
Connect to a Network Resource Outside the Domain Using Workgroup Credentials
net use Z: \\OtherWorkgroupPC\SharedFolder /user:WorkgroupUser Password
If you're outside your domain and need to access a workgroup share, you can authenticate using a workgroup username and password. This comes in handy when you're managing or troubleshooting other devices that aren’t part of the domain. I’ve used it when accessing a colleague's machine in a different workgroup.
Map a Drive from a Workgroup Machine to a Domain Server
net use Z: \\DomainServer\SharedFolder /user:Domain\Username Password
This allows you to map a network drive from a workgroup to a domain-joined server. You simply authenticate using domain credentials. I use this command when I'm on a workgroup machine but need to access resources stored on a domain-joined server.
Map a Drive to a Shared Folder Using Different Domain Credentials
net use Z: \\ServerName\SharedFolder /user:OtherDomain\Username Password
When connecting to a server in a different domain, this command lets you specify the external domain’s credentials. It’s super helpful if you’re working in a multi-domain environment. I use this whenever I’m working on cross-domain projects and need access to shared resources.
Map a Drive to a Shared Folder and Set It to Reconnect Automatically
net use Z: \\ServerName\SharedFolder /persistent:yes
This is perfect when you need the network drive to reconnect automatically after a reboot. It’s great for any resource you regularly need to access. Once the command runs, you won’t need to remap the drive the next time you log in.
Are you trying to map a drive for backups? Then you should have a look at BackupChain, an excellent network backup software for Windows.
Also, did you know that you can map a drive to S3, FTP, and SFTP storage? You can't do that with net use, instead use DriveMaker.