How to set up smartphones and PCs. Informational portal
  • home
  • OS
  • How to connect a drive as a network drive? How to map a network drive from the Windows command line.

How to connect a drive as a network drive? How to map a network drive from the Windows command line.

Today, when prices for computer equipment have become more or less acceptable, every family member can acquire their own computer. There is nothing to say about small and medium-sized enterprises; the use of several computers connected into a single local network is commonplace. Naturally, in such conditions, users often have to exchange files while working. Using removable portable drives for this is not very convenient, so operating system developers have implemented such an option as creating a network drive. Essentially, this resource is a directory or a separately created logical section to which it opens, i.e. Hosts connected by a local network can connect. Very rarely, network drives on a home PC are created for access from the global network, for example, when the machine is used as a mini-server; generally, shared folders on cloud services are used to provide unified access to user files from the Internet.

Today we will learn how to create and add a network drive on the local network. The main distribution computer is usually the administrator's computer, but it can also be any other PC on the network.

Sharing

It all starts with creating an ordinary folder with unusual properties. Our example resource will be called WorkFolder. Create a folder with a suitable name in the location you need, open its properties, switch to the “Access” tab and click the “Advanced settings” button.

In the new dialog box, check the “Share…” checkbox, set, if required, the number of concurrent users accessing it, and then click “Permissions.” By default, everyone has read-only permission, if you want other users to be able to edit files on the disk and write their data to it, change the permissions accordingly. Save the settings one by one.

At the last stage of saving, in the properties window you should see the message “Shared access available” and the path itself, starting with two slashes.

Now, by clicking the share button, add in the window that opens users who will be able to access the shared folder on their PCs, otherwise they will receive a network error, the description of which is presented in the screenshot below.

At this stage, the basic configuration of the network drive ends. The next step is to test network discovery. If your network is defined as private, discovery should be enabled by default, but if it is defined as public, you will most likely have to open it. Execute the command in the Run window control /name Microsoft.NetworkAndSharingCenter, and then click on the “Change advanced sharing settings” link on the left.

Activate the "Enable network discovery" radio button in the current profile and apply the changes. To be able to connect a network drive, the manipulations done should be sufficient; if the latter then does not want to connect, try changing the network mode.

Adding a network drive

You can connect a newly created resource in different ways, including through the usual CMD console, but we will consider the simplest option. Right-click on the “This Computer” shortcut (no matter where) and select “Map network drive” from the menu.

In the window that launches the wizard, select a letter for the future resource, be sure to check the “Use other credentials” checkbox, otherwise other users will not even be able to see it on their computers.

Using the browse button, select the folder for which you set up sharing.

After clicking the “Finish” button, Windows will ask for your current login and password.

The corresponding section should also become visible in the main workspace of this computer.

To disable a network resource, right-click on it and select “Disable” from the menu. You can also select it with the mouse and select “Disconnect network drive” from the Network ribbon menu.

Connect by name or IP address

There are also other ways to connect a created and configured shared resource, but they are less convenient. For example, instead of searching for it through browsing, you can specify its symbolic or IP address in the connection window field. The symbolic address is specified in the folder properties, the IP in the adapter properties “Local Area Connection” (IPv4 address parameter).

The same address can be obtained from the command line by running the command ipconfig /all(the data will be located in the section of the same name).

Using the Command Line

And finally, let's look at how to connect a network drive in Windows 7/10 using the CMD command line or the PowerShell console; perhaps some will find this method even faster. The general command syntax looks like

net use \\ComputerName\ShareName[\volume]
username]

Here drive is a free drive letter, and \ComputerName\ShareName– path to the shared folder. Let's connect our WorkFolder folder from the desktop as a network drive, for which, in a line run with administrator rights, run the following command:

net use Z: //DESKTOP-8CS7OLG/WorkFolder /user:compik 11111

Parameter /user necessary so that the system does not request authorization. The string element “compik” in this example is the name of the computer administrator, and “11111” is his current password. To make the network drive permanently connected, and not just during an open session, you can add the key to the end of the command /persistent:yes.

To disconnect the disk, run the command net use z: /delete, where z is the drive letter.

Unfortunately, in the Windows 10 we tested, when connecting with the net use command, the corresponding volume was not displayed in the “This PC” section, remaining accessible from the Explorer navigation bar.

So, now you know how to set up a network drive, but these, of course, are only general recommendations. Practice shows that in the process of connecting this type of resource, you often have to deal with various errors, of which the most common is “Network path not found.” Failures may be caused by problems with network adapter settings, drivers, network security settings, and so on. In such cases, problems are usually resolved privately based on the identified cause.

Click " Service"- "Connect a network drive"

ReviewOK".

You can change the drive letter if it is busy, to do this, click Disk and select a letter. When finished, click " Ready".

As a result, you will see the mapped network drive.

How to map a network drive in Windows 7.

Before connecting a network drive on Windows7, you need to check the network settings, to do this, go to " Start" - "Control Panel" -" or click on the button Network connection on the taskbar and select "Network and Sharing Center".

In the window that opens Network and Sharing Center look at what network is being used (in this example - Work) click on "".

In the profile you are using (home, work or general), check whether it is enabled Network discovery, if it's off, turn it on. Save your changes.

Now you can proceed directly to connecting a network drive; to do this, go to Computer, press " Connect a network drive".

The Network Drive Mappings window will open. Click " Review", select the computer on which the network folder is located, click on it and select the required folder, click " OK". You can change the drive letter, to do this, click on the field highlighted in yellow and select another letter. At the end, click " Ready".

In addition to this method for connecting a network drive, you can

How to map a network drive in Windows 8.

Before connecting a network drive on Windows8, you need to check the network settings; to do this, go to "Control Panel" - "Network and Sharing Center""or click on the Network connection button on the Taskbar and select "Network and Sharing Center".

In the window that opens, look at what network is being used (in this example - Public) click on " Change advanced sharing options".

In the profile you are using (private, guest or public), make the necessary changes, namely:

Enable network discovery;

Save your changes.

Now you can connect a network drive, to do this, click on the shortcut Computer select tab "Computer"-"Connect a network drive".

The Network Drive Mappings window will open. Click " Review", select the computer on which the network folder is located, click on it and select the required folder, click " OK". You can change the drive letter, to do this, click on the field highlighted in yellow and select the letter. At the end, click " Ready".

As a result, a network drive will appear.

Mapping a network drive using a script in Windows XP, Windows 7, Windows 8.

To connect/disconnect a network drive and a network printer, use the command net use, here is the syntax of this command:

NET USE
[devicename | *] [\\computer_name\resource_name[\volume] [password | *]]
Username]
Username]

[ | ]

NET USE (devicename | *) [password | *] /HOME

NET USE

The NET USE command connects a computer to a share or disconnects a computer from a share. When the command is used without parameters, a list of connections for this computer is displayed.

device_name Assigns a name to connect to a resource or specifies a device to disconnect from. There are two types of device names: disk devices (letters D: to Z:) and printers (LPT1: to LPT3:). If you enter an asterisk (*) instead of a device name, the next unused name is assigned.
\\computer_name Specifies the name of the computer that controls the share. If you use spaces in the computer name, you must enclose the entire parameter in quotation marks along with two backslashes (\\). The computer name can be from 1 to 15 characters long.
\resource_name Specifies the network name of the share.
\volume Specifies the NetWare volume on the server. To access NetWare servers, you must install and run the NetWare Client Services (Windows Workstations) or the NetWare Gateway Service (Windows Server).
password Specifies the password required to access the share.
* Prompts for a password. The password is not displayed when entered on the command line.
/USER Specifies a different username with which to establish the connection.
domain name Indicates a different domain. If the domain is not specified, then the current domain used when logging into the network is assumed.
Username Specifies the username to log into the network.
/SMARTCARD Indicates that this connection uses smart card credentials.
/SAVECRED Specifies that the username and password should be saved. This parameter is skipped if the command does not prompt for a username and password.
/HOME Connects the user to the home directory.
/DELETE Cancels a network connection and removes it from the list of persistent connections.
/PERSISTENT Controls the use of persistent network connections. The default is the last used parameter.
YES Saves established connections and restores them the next time you log on to the network.
NO Does not save established connections or subsequent connections, as a result they will not be restored the next time you log in. To delete persistent connections, use the /DELETE parameter.

An example of using the net use command:

net use z: /delete
net use z:\\computer1\Shared Folder
net use /Persistent:Yes

net use z: /delete - command to unmount network drive Z.

computer1\Shared Folder - path to the shared folder (network folder)

net use /Persistent:Yes- when rebooting, restore mounted disks (if you specify NO - reset settings).

In order to create a script, create a text file, write the necessary commands, and save. Change file extension from TXT to BAT. Now you can simply launch the BAT file with two mouse clicks and all the specified commands will be executed.

If you have a local network, then the presence of network folders in it is a completely natural phenomenon. File storages, separate shared directories on computers. However, each time opening the desired computer in a network environment and searching for the desired directory there can be a very tedious task. Especially for these and a number of other cases, Windows 7 supports the ability to create a network drive for quick access to directories on the network. But not everyone knows how to do this correctly. Therefore, in this article, I will tell you about how to connect a network drive in Windows 7, as well as what nuances there are.

From a usage point of view, a network drive is no different from a regular drive. You can also record, copy and move files. The only difference is the speed of operations, which must always be remembered. It is smaller, since the files are not read directly from the disk, but are transferred over the network. In addition, it is worth considering that if the local network is loaded, for example, several people will use such a disk, then the speed may be very low.

Now, let's look at how to connect a network drive in Windows 7 through a standard interface:

1. Open File Explorer and go to Computer. This can also be done using the combination “WinKey (Windows Key) + E”.

2. In the top menu, click on the "Map network drive" item.

3. In the window that opens, as shown in the figure above, you must specify the network drive letter, then select the network directory. For example, "\\computer1\video" or "\\192.168.0.112\video". You can also specify whether this disk needs to be restored after restarting Windows. If necessary, provide connection credentials.

4. Click the "Done" button at the bottom.

5. The network drive will be available for use.

As you can see, creating a network drive using the standard Windows 7 interface is quite simple, but it is always useful to know alternative methods.

Many tools in Windows 7 are available from the command line, which is sometimes very convenient and much faster to use. Therefore, now we will look at how to connect a network drive from the console. To do this, we need the "net" command with the "use" parameter. And here are the actions you can do using this combination:

1. Connecting a network drive. Open a command prompt, type the following command and press enter:

net use Z:\\addr\folder

Where " net use"is the team itself," Z:" is the desired drive letter (double quotes are required), " \\addr\folder" is the address of the network directory.

The network drive will be created.

2. Set disks to automatically mount on Windows 7 reboot. So, you have mapped a network drive. However, the moment that the disk will or will not be connected after rebooting the computer remains unknown (the last execution of the automatic repair installation command is taken). Therefore, it should be explicitly specified, for which you need to enter the following command:

net use /Persistent:Yes

Where " net use" is the team itself, and " /Persistent:Yes" is a parameter that specifies that a network drive should be connected at each system boot. Please note that this setting applies to the last connected drive and becomes the "default" for all subsequent ones. If you want to specify that the drive does not need to be restored, then instead of " /Persistent:Yes"must be specified" /Persistent:No".

3. Removing a network drive. Network drives can be temporary, so it's good to know how to delete them. And here is the corresponding command:

net use Z: /delete

Where " net use"is the team itself," Z:" is a network drive, " /delete" - a parameter that indicates that this network drive needs to be deleted.

Windows 7 is a wise and practical decision on your part. Now I will explain why. Anyone who has organized a local network in his home constantly uses certain data that is on other computers using this very local network.

In order to increase the convenience of your work, you can connect a network drive to your computer. What it is? This is just a network folder that is connected in such a way that your computer or laptop will see it the same way as its own hard drives. It is assigned a specific letter, after which you can simply forget that it is actually located on another device.

In order for you to be able to connect a Windows 7 network drive to your computer or laptop, open the standard Explorer, which is located in the “Standard” folder. To do this, click the “Start” button, select the “All Programs” section in the menu that appears, where expand the “Accessories” tab. The “Explorer” we need will be there, so launch it. Once you've done this, look for a menu at the top called "Tools." Open it and select Drive. At this moment, a corresponding window should open in which we will set the necessary settings.

The first thing you need to do is select the desired letter in the expanded window. Once you do this, your network drive will assign it to itself. Note that you can only select a letter that is not already used by other devices (hard drives, CD drives, floppy drives, etc.). After that, you will be required to specify the exact location of the directory. You must enter the desired path to the folder that you want to use as a network drive. This can be done in various ways. For example, you can enter an exact address using the keyboard, and you can also locate this resource by clicking on the "Browse" button. The latter method will be much more convenient and faster.

An important condition: during the implementation of this procedure, the device on which this folder is physically located must be turned on. Otherwise, you will fail, because your computer or laptop simply will not be able to see the required directory.

In the event that you want to connect on behalf of some other user, you will need to check the box next to the field for using other credentials. After that, you will have to fill in all the necessary data for a particular user in the window that will appear in front of you immediately after you confirm your choice using the "Finish" button.

Upon completion of all the above steps, in your window called "Computer", a group called "Network Locations" should be displayed. Your new network folder will be reflected there.

Disconnecting a network drive is done in a similar way. Call the explorer window, through the "Tools" menu, select the function of disabling the network drive. In the window that appears, select the drive that you no longer need and confirm by clicking on "OK".


I looked at your link: it is only about NT4 Workstation.
Which is quite reasonable: the number of people who still use this antique
as a personal computer is close to zero.

About the end of support for NT 4 Server there is not a word!
But it is likely that support for NT 4 Server has also been discontinued -- including
sense that after SP6 no new updates are expected for it.

In this case, however, we are not talking about NT4 support, but about compatibility
client Win7 from the client's Vista, For example. Why Vista is safe
connects to "unsupported" NT4, and Win7 suddenly stopped (starting from v. 7100)?
This is a conscious decision by MS, in order to force the management of organizations
with small and medium-sized networks (up to 100-200 computers) purchase new servers like Win 2008?
Or just a glitch?

If it is a conscious decision, then, in my humble opinion, it is wrong.
First, the economic crisis will make every boss a little more tight-fisted.
Secondly, bosses usually prefer to equip their offices with the latest computers.
with the latest Windows (and not only bosses - ordinary employees prefer
the same thing - to the best of one’s more modest capabilities).
But do not update old domain servers without a good reason,
fully coping with their responsibilities, for new ones, paying a considerable price
for the new bells and whistles of these servers (such as Active Directory),
completely unnecessary in this small network.
And in the situation: should I update the domain server, only in order to be able
then buy computers with Win7 and use the services of the new one without any problems
domain or leave the good old domain server and Not buy no Win7 yet - perhaps
that many will choose the second.
Especially in times of economic crisis, there is no time to be fat, I wish I could live.
At our institute, I am absolutely sure that this will be the case.
And some individuals, although they will buy Vin7 privately, will force it
"mow" under Win95, thereby weakening corporate security.
Which the bosses are unlikely to like. But this individual, of course,
will have the right to place all the blame on MS :)

So it remains to be seen whether MS will win or, on the contrary, lose as a result of this
blackmail with "non-support".

So I hope this is just a glitch. Which will be easiest to fix by MS itself.
If she doesn’t fix it herself, then, of course, there will be “folk craftsmen” who
The glitch will be fixed. And they will add some kind of Trojan to the pack. To make life better and more fun :)

NT4 itself has long been beyond any and all security standards. And there is absolutely no point in attaching new operating systems to it as clients - the capabilities of these operating systems in collaboration with NT will not be used even half. And what's the point of having a garden? For small networks there is a simple and fairly cheap solution - Windows Small Business Server 2008; a full-scale W2k8 for such tasks is a pointless luxury. And the crisis has nothing to do with it - in the state office the main thing is to competently justify the replacement with a lot of numbers, details and other horror stories. Believe me, I know what I’m talking about - I’ve worked in such institutions.

But this is all lyrics. Tell me, is the same problem observed if you install Win7 not on virtual, but on physics? The above is my personal opinion and has no association with Microsoft.

Best articles on the topic