From the course: Windows 11: Manage and Maintain

Sharing folders

- [Instructor] If you want to share data with others who use your computer or need access via a local network, you'll need to create shared folders. Once you do, you can control who has access to these folders. This is called authentication. You can also control what users can do with these resources once they have access and this is called authorization. There are several ways to create shared folders in Windows 11. You can use File Explorer to create simple shared folders. We will do this first. You can also create and manage shares from a command line or a PowerShell session too. We will do this as well and we will create network shares there. And you can use the Computer Management console to view and manage the shares you create. Let's start with File Explorer. You can open File Explorer by clicking the folder icon on the taskbar. For the sake of simplicity, click This PC and choose Desktop. Click New, then Folder and name the folder whatever you'd like. I'll call mine Share and press Enter. This is the most basic way to share a folder locally. Now right click the folder and click Properties. Click the Sharing tab. If you click Share, you'll see the share options. However, if you click Advanced Sharing, you'll see a lot more. Let's click that one. Here click share this folder. Now we can apply permissions. Click Permissions and look at the Permissions for Share dialog box that appears. Although I'll go over permissions and how to configure those in an upcoming movie, you can likely see why you'd want to make changes here. Letting everyone read what's in the folder you've just created and shared isn't very secure. Since I only want to talk about how to create shares in this video, I'm going to go ahead and click Cancel, Cancel and Close. Beyond File Explorer and creating local shares, you can create network shares at a command prompt and in PowerShell. Let's practice a few of these commands to get familiar with them. Open a command prompt by typing CMD in the search window on the taskbar. And then right click and choose Run As Administrator. I'll type Net, space, Share, space, Share1 equal quotes, C:\Users, end quote. And I'll press Enter. You can see the command creates the share. Continue to do this as desired and when you're ready to see a list of shared network files, type Net Share and click Enter here. Here's Share1 in the C:\Users folder. There are some related Net Share command line options, including a forward grant user permissions and delete. Back at the command prompt, I'll type net share, a space, a forward slash and a question mark to show you. Here are the switches. Now let's open PowerShell. I'll type PowerShell here on the taskbar and like command prompt, I'll right click and choose to run as administrator. First, let's type Get-SMBShare to see all the shares. Here are the shares on my computer. And here is Share1. Now we can try to get access to any of those shares with this command. Get-smbshareaccess, space, -name, space, and in quotes, Share1. Here you can see that for this share, everyone can read what's in the folder. And that's the default setting when you create a share. Now let's type a command to create a new share. I'll type new-SMBShare Share2 and press Enter. Since I didn't specify a path, now I'll have to write one. So I'll type C:\Users and press Enter again. The new share has been created. And just for practice, let's delete that. You can do that with this command. Remove-smbshare, space, share2. I'll type Y to confirm. To end, let's look at the Computer Management console. Right click Start, and click Computer Management in the results. I'll expand Shared Folders and I'll click Shares. Again, look at our shares in the folder path. You can double click any share to access its properties. There are three tabs: General, Share Permissions and Security. From general, you can change how many users can access the share at one time. The default is set to maximum but you could allow a specific number, say five. I'll click Apply. From the Share Permissions tab, you can change the permissions that are applied to everyone. One way to lock this down is to remove the Everyone group and then only add groups of people you want to have access to. You'll learn more about this later but it's best to apply permissions from the Security tab, if there is one. The Security tab offers additional options around NTFS permissions versus share permissions. Again, you'll learn more about this in other movies. Here everyone can read and execute, list folder contents, read and nothing else. I'll click Cancel and close this window to conclude. When you're finished exploring, close the dialog box and any open windows and continue.

Contents