= Create new file shares :toc: :icons: :linkattrs: :imagesdir: ../../resources/images == Summary This section will create new file shares. You can use standard Microsoft tools to create new file shares on your Amazon FSx for Windows File Server. == Duration NOTE: It will take approximately 15 minutes to complete this section. == Step-by-step Guide === Connect to Windows Instance 0 IMPORTANT: Read through all steps below and watch the quick video before continuing. image::connect-to-windows-instance-0.gif[align="left", width=600] . Open the link:https://console.aws.amazon.com/ec2/[Amazon EC2] console. + TIP: *_Context-click (right-click)_* the link above and open the link in a new tab or window to make it easy to navigate between this github workshop and AWS console. + . Make sure you are in the same *AWS Region* as the workshop environment. . *_Select_* *Running Instances*. . *_Select_* the radio button next to the instance with the name *Windows Instance 0*. . Copy the *Public DNS (IPv4)* name of the *Windows Instance 0* instance. . Launch your remote desktop application and create a new connection. . Use the DNS name copied above as the host name of the new connection. . Start a new remote desktop session to the new connection (you will retrieve the *user name* and *password* from *AWS Secrets Manager*). . Open the link:https://console.aws.amazon.com/secretsmanager/[AWS Secrets Manager] console. + TIP: *_Context-click (right-click)_* the link above and open the link in a new tab or window to make it easy to navigate between this github workshop and AWS console. + . *_Select_* the *Secret name* link for *Password-*. . *_Scroll_* to the *Secret value* section and *_click_* the *Retrieve secret value* button. . Use the *Secret key/value* pairs of *username* and *password* as the credentials to authenticate to the *Windows Instance 0* instance for the remote desktop session. === Map default file share IMPORTANT: Read through all steps below and watch the quick video before continuing. image::map-default-file-share.gif[align="left", width=600] . Once you've logged on to the *Windows Instance 0* instance, *_launch_* *File Explorer*. . *_Context-click_* *This PC* and *_select_* *Map network drive...* . Map the file share using the following information: + [cols="3,10"] |=== | *Drive* a| Z: | *Folder* a| This is the UNC path of the file system's default file share. From the link:https://console.aws.amazon.com/fsx/[Amazon FSx] console, *_click_* the link to the *Amazon FSx for Windows File Server SAZ* file system and *_select_* the *Network & security* tab. *_Copy_* the *DNS Name* of the file system to the clipboard and paste it as the first part of the UNC path. *_Add_* *\share* to the end of the *DNS Name* to complete the UNC path to the file system's default file share (e.g. \\fs-0123456789abcdef.example.com\share). | *Reconnect at sign-in* a| Leave checked | *Connect using different credentials* a| Leave unchecked |=== + . In the *File Explorer* window of the *Z:* drive, create new test files. *_Context-click_* >> *New* >> *Text Document*. Create a few different types of test files. === Create new file shares IMPORTANT: Read through all steps below before continuing. . *_Click_* *Start* >> *Windows PowerShell*. . *_Copy_* the script below into your favorite text editor and replace *_FSxFileSystem-Remote-PowerShell-Endpoint_* with the Windows Remote PowerShell Endpoint of *Amazon FSx Windows File Server SAZ*. *_Run_* the updated script in the *Windows PowerShell* window to create a remote PowerShell session to *Amazon FSx Windows File Server SAZ*. + [source,bash] ---- enter-pssession -ComputerName *_FSxFileSystem-Remote-PowerShell-Endpoint_* -ConfigurationName FsxRemoteAdmin ---- + . *_Copy_* the script below and it in the newly created remote PowerShell session. + [source,bash] ---- New-Item -Type Directory -Path "D:\application" New-FSxSmbShare -Name "application" -Path "D:\application" -Description "application share" -FolderEnumerationMode AccessBased -EncryptData $true New-Item -Type Directory -Path "D:\data" New-FSxSmbShare -Name "data" -Path "D:\data" -Description "data share" -FolderEnumerationMode AccessBased -EncryptData $true ---- + . If the *Windows PowerShell Credential Request* window pops up, retrieve and use the same credentials from *AWS Secrets Manager* you used earlier in this section. . *_Type_* *fsmgmt.msc*. . From the *Shared Folders* Console, *_select_* *Action* >> *Connect to another computer...*. . *_Paste_* the computer name copied above in the *Another computer:* text box and *_click_* *Ok*. . *_Double-click_* the *Shares* folder. . With the *Shares* folder selected, *_click_* *Action* >> *New Share...* from the menu. . Complete the *Create A Shared Folder Wizard*, creating new shares using on the following attributes: + |=== | *Share name* | *Folder path* | *Create new path* | *Shared folder permissions* | application | D:\application | Yes | Administrators have full access; other users have no access | data | D:\data | Yes | Administrators have full access; other users have no access |=== + . Experiment and create other file shares. All shares must be created on the *D:\* drive. === Access the new file shares . *_Open_* a new *File Explorer* windows. . Use UNC paths to connect to the newly created file shares. Experiment using the file system DNS name and the file system's computer name (FQDN) you found earlier. Remember to add different file shares at the end of the DNS name to make up the full UNC path (e.g. *\\fs-0123456789abcdef.example.com\application*, *\\amznfsxdduvdamf.example.com\data*, etc.). == Next section Click the button below to go to the next section. image::04-test-performance.png[link=../04-test-performance/, align="left",width=420]