Install File Server Role To Configure File Server
Install File Server Role To Configure File Server
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
[2] Run [Server Manager] and click [Add roles and features].
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Directory: D:\
# set sharing
# -Name [share name you like]
# -Path [path of shared folder]
# -FullAccess [users or groups that is granted full-control permission]
PS C:\Users\Administrator> New-SmbShare -Name "ShareAll" -Path "D:\ShareAll" -FullAccess "E
veryone"
# confirm settings
PS C:\Users\Administrator> Get-SmbShare -Name "ShareAll" | Format-List -Property *
PresetPathAcl : System.Security.AccessControl.DirectorySecurity
ShareState : Online
AvailabilityType : NonClustered
ShareType : FileSystemDirectory
FolderEnumerationMode : Unrestricted
CachingMode : Manual
LeasingMode : Full
SmbInstance : Default
CATimeout :0
ConcurrentUserLimit : 0
ContinuouslyAvailable : False
CurrentUsers :0
Description :
EncryptData : False
IdentityRemoting : False
Infrastructure : False
Name : ShareAll
Path : D:\ShareAll
Scoped : False
PSComputerName :
CimClass : ROOT/Microsoft/Windows/SMB:MSFT_SmbShare
CimInstanceProperties : {AvailabilityType, CachingMode, CATimeout, ConcurrentUserLimit...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
[2] Right-Click the Folder you'd like to set Sharing and Open [Properties].
[4] Select users or groups you allow to access to Sharing. On this example, select [Everyone].
[5] Select Access permission for the users or groups you set. On this example, select [Read/Write].
[6] This is the setting of Network discovery and file sharing. Select the one for your
requirements. On this example, select [No, *****].
[8] To configure with [Share...] button, NTFS access permission is also configured automatically.
(on this example, Everyone:FullControl has been set)
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
# create a group
PS C:\Users\Administrator> New-LocalGroup -Name "DevGroup01"
Name Description
---- -----------
DevGroup01
Directory: D:\
# set sharing
# -Name [share name you like]
# -Path [path of shared folder]
# -FullAccess [users or groups that is granted full-control permission]
PS C:\Users\Administrator> New-SmbShare -Name "Share01" -Path "D:\Share01" -FullA
ccess "DevGroup01"
# confirm settings
PS C:\Users\Administrator> icacls "D:\Share01"
D:\Share01 BUILTIN\Administrators:(F)
RX-8\DevGroup01:(OI)(CI)(F)
BUILTIN\Administrators:(I)(OI)(CI)(F)
NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
CREATOR OWNER:(I)(OI)(CI)(IO)(F)
BUILTIN\Users:(I)(OI)(CI)(RX)
BUILTIN\Users:(I)(CI)(AD)
BUILTIN\Users:(I)(CI)(WD)
# confirm settings
PS C:\Users\Administrator> icacls "D:\Share01"
D:\Share01 BUILTIN\Administrators:(F)
RX-8\DevGroup01:(OI)(CI)(F)
BUILTIN\Administrators:(OI)(CI)(F)
NT AUTHORITY\SYSTEM:(OI)(CI)(F)
CREATOR OWNER:(OI)(CI)(IO)(F)
[2] Add Users or Groups you allow to access to Sharing. On this example, Add [DevGroup01] for Shar
refer to here.
[3] Right-Click the Folder you'd like to set Sharing and Open [Properties]. Next, move to
[Sharing] tab and Click [Advanced Sharing] button.
[4] Check a box [Share this folder] and input any Share name you like on [Share
name] field. Next, Click [Permissions] button.
[5] Add Users or Groups you'd like to allow to access to Share. By default,
[Everyone:Read] is granted, Remove it with [Remove] button, and next, Click [Add]
button to add necessary permissions.
[9] Back to the [Properties] window, then Click [Security] tab to move to add NTFS access
permissions, too.
[11] Remove unnecessary permissions like Users and so on. But generally inheritance is
enabled, so disable it first to remove unnecessary permissions. Click [Disable
inheritance] button.
[12] Select the way for removing inheritance. On this example, select [Convert ***].
[13] Click [Remove] button to remove unnecessary permissions like Users first, next, Click
[Add] button to add necessary permissions.
[14] This is the window for setting permissions. Click [Select a principal] link.
[17] After setting necessary permissons, Click [OK] to finish settings. That's OK all.
Access to Share folder from Client Computer. This example is on Windows 10.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
# on all examples here, specifying authentication user and password is not needed on spe
cific cases like follows
# * server/client are both in AD Domain and also logon user on Client is allowed to access
to Share
# * even on workgroup environment, a user exists on Client that name is the same with th
e user that is allowed to access to Share on Server and also their password is the same
# confirm
PS C:\Users\serverworld> Get-SmbMapping
PS C:\Users\serverworld> ls Z:\
Directory: Z:\
# confirm
PS C:\Users\serverworld> Get-PSDrive -Name "Share01" | Format-Table -AutoSize
PS C:\Users\serverworld> ls Share01:\
Directory: \\rx-7.srv.world\Share01
PS C:\Users\serverworld> ls "\\rx-7.srv.world\Share01"
Directory: \\rx-7.srv.world\Share01
[2] This is for the case of Assigning drive letter and access to Share Folder.
Open Explorer and right-click [Network] on the left pane, then select [Map network
drive].
[3] Select drive letter on [Drive] field, and Input Share folder Path like [\\(Server
name)\(Share Name)], then Click [Finish] button.
[4] User authentication form is shown and you need to authenticate with a user that is
set to allow to access to Share on Server. But on specific cases like follows, User
authentication form is not shown because authentication is passed on background.
The specific cases without user authentication form is like follows.
* File Server and Client Host are in the same Active Directory Domain and also a
user logon on Clist Host is allowed to access to Share Folder on Server setting.
* Even on WorkGroup environment, a user exists on Client Host that name is the
same with the user that is allowed to access to Share Folder on Server settings and
also their password is the same.
Google Dịch nhé
[5] Just accessed to Share folder. Try to read or write files or folders to verify settings.
[6] This is for the case of accessing to Share Folder without assigning drive ltter.
Run [Start] - [Run] and then, input Share path like [\\(Server name)\(Share name)].
To configure SMB Multi Channel feature that is implemented in SMB 3.0, it's possible to
use multiple network interfaces for file service.
To use SMB Multi Channel feature, it must satisfy at least one of the following
conditions.
⇒ https://docs.microsoft.com/ja-jp/archive/blogs/josebda/the-basics-of-smb-multichan
nel-a-feature-of-windows-server-2012-and-smb-3-0
[1] Run PowerShell with Admin Privilege and Configure.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
EnableMultiChannel : True
Scope Name Interface Index RSS Capable RDMA Capable Speed IpAddress
---------- --------------- ----------- ------------ ----- ---------
* 3 True False 100 Gbps fe80::7494:7d50:b117:fb7f
* 7 True False 100 Gbps fe80::6c2e:c49f:a87c:e46a
* 3 True False 100 Gbps 10.0.0.111
* 7 True False 100 Gbps 10.0.0.101
InterfaceAlias : Ethernet 2
InterfaceGuid : {2306e939-d659-457f-a5a7-a74732d811fb}
InterfaceIndex : 3
ServerName : rx-7
PSComputerName :
InterfaceAlias : Ethernet
InterfaceGuid : {fdad18a7-270b-414c-938d-3fbeb45f507f}
InterfaceIndex : 7
ServerName : rx-7
PSComputerName :
# confirm settings
PS C:\Users\Administrator> Get-SmbMultichannelConstraint
InterfaceAlias : Ethernet 2
InterfaceGuid : {2306e939-d659-457f-a5a7-a74732d811fb}
InterfaceIndex : 3
ServerName : rx-7
PSComputerName :
InterfaceAlias : Ethernet
InterfaceGuid : {fdad18a7-270b-414c-938d-3fbeb45f507f}
InterfaceIndex : 7
ServerName : rx-7
PSComputerName :
Confirm
Are you sure you want to perform this action?
Performing operation 'Remove-SmbMultiChannelConstraint' on Target 'rx-7,{2306e939-d659
-457f-a5a7-a74732d811fb}'.
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
Confirm
Are you sure you want to perform this action?
Performing operation 'Remove-SmbMultiChannelConstraint' on Target 'rx-7,{fdad18a7-270b-
414c-938d-3fbeb45f507f}'.
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
[2] Verify file transfer speed to access to the target file service from any client computer.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
PS C:\Users\Administrator> Get-SmbShare
Description :
Name : 100 MB Limit
Size : 104857600
SoftLimit : False
Threshold : {MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold, MSFT_FSRMQ
uotaThreshold}
UpdateDerived : False
UpdateDerivedMatching : False
PSComputerName :
.....
.....
Description :
Name : 2 GB Limit
Size : 2147483648
SoftLimit : False
Threshold : {MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold, MSFT_FSRMQ
uotaThreshold}
UpdateDerived : False
UpdateDerivedMatching : False
PSComputerName :
.....
.....
Confirm
Are you sure you want to perform this action?
Operation: Delete, Object: quota, Object Identifier (Path): D:\Share01
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
[2] Run [Start] - [Server Manager] - [Tools] - [File Server Resource Manager].
[3] Select [Quotas] on the left pane and right-click it, then Open [Create Quota].
[4] Input the Share Path you'd like to set Quota in [Quota path] field.
And Check a box [Create quota on path].
([Auto apply template ****] option is for the auto applied Quota setting, refer to the next page if y
For Quota properties, Select a templates or set yourself.
(on this example, select a template to proceed)
[7] Verify Quota setting is valid on the Share folder you set Quota. If you try to save files over capacit
you can not save a file like follows.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
PS C:\Users\Administrator> Get-SmbShare
Description :
Name : 100 MB Limit
Size : 104857600
SoftLimit : False
Threshold : {MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold, MSFT_FSRMQ
uotaThreshold}
UpdateDerived : False
UpdateDerivedMatching : False
PSComputerName :
.....
.....
Description :
Name : 2 GB Limit
Size : 2147483648
SoftLimit : False
Threshold : {MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold, MSFT_FSRMQ
uotaThreshold}
UpdateDerived : False
UpdateDerivedMatching : False
PSComputerName :
.....
.....
# for example, set auto apply quota template with 2GB hard limit to [Share02] folder
PS C:\Users\Administrator> New-FsrmAutoQuota -Path "D:\Share02" -Template "2 GB Limit"
Disabled : False
Path : D:\Share02
Size : 2147483648
SoftLimit : False
Template : 2 GB Limit
Threshold : {MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold, MSFT_FSRMQ
uotaThreshold}
UpdateDerived : False
UpdateDerivedMatching : False
PSComputerName :
Confirm
Are you sure you want to perform this action?
Operation: Delete, Object: auto-quota, Object Identifier (Path): D:\Share02
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
[2] Run [Start] - [Server Manager] - [Tools] - [File Server Resource Manager].
[3] Select [Quotas] on the left pane and right-click it, then Open [Create Quota].
[4] Input the Share Path you'd like to set auto apply Quota in [Quota path] field.
And Check a box [Auto apply template and create quotas on existing and new subfolders].
For Quota properties, Select a templates you'd like to set.
[7] For auto apply Quota setting, each subfolder under the folder you set auto apply Quota are show
This example is based on the Active Directory Domain environment like follows.
|
+----------------------+ | +----------------------+
| [ fd3s.srv.world ] |10.0.0.100 | 10.0.0.101| [ rx-7.srv.world ] |
| Active Directory +-----------+-----------+ File Server #1 |
| | | | DFS NameSpace |
+----------------------+ | +----------------------+
|
| +----------------------+
| 10.0.0.102| [ rx-8.srv.world ] |
+-----------+ File Server #2 |
| |
+----------------------+
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
This example is based on the Active Directory Domain environment like follows.
|
+----------------------+ | +----------------------+
| [ fd3s.srv.world ] |10.0.0.100 | 10.0.0.101| [ rx-7.srv.world ] |
| Active Directory +-----------+-----------+ File Server #1 |
| | | | DFS NameSpace |
+----------------------+ | +----------------------+
|
| +----------------------+
| 10.0.0.102| [ rx-8.srv.world ] |
+-----------+ File Server #2 |
| |
+----------------------+
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
# confirm settings
PS C:\Users\serverworld> Get-DfsnRoot -Path '\\srv.world\Share' | Format-List
Path : \\srv.world\Share
Description :
Type : Domain V2
State : Online
Flags :
TimeToLiveSec : 300
[3] Right click the [Namespaces] on the left pane and open the [New Namespaces] on the menu.
[4] Set server's hostname you'd like to set DFS Namespaces and click [Next] button.
[6] Select Domain-based or Standalone type. It selects Domain-based on this example. For [Enable W
specific requirements, generally Check the box to enable it.
|
+----------------------+ | +----------------------+
| [ fd3s.srv.world ] |10.0.0.100 | 10.0.0.101| [ rx-7.srv.world ] |
| Active Directory +-----------+-----------+ File Server #1 |
| | | | DFS NameSpace |
+----------------------+ | +----------------------+
|
| +----------------------+
| 10.0.0.102| [ rx-8.srv.world ] |
+-----------+ File Server #2 |
| |
+----------------------+
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
# confirm settings
PS C:\Users\serverworld> Get-DfsnFolder -Path '\\srv.world\Share\*'
[2] Run [Start] - [Server Manager] - [Tools] - [DFS Management] and Right-click the created Namespa
menu.
[3] Input any folder name on [Name] field, and input shared folder on [Folder targets] section.
[4] After settings shared folders, they are listed. Next, verify to access to the DFS Namespace root fro
same AD domain.
Install DFS (Distributed File System) Replication feature to configure DFS Replication with multiple
To configure DFS Replication, it's possible to replicate data in a target folder on a server to other s
This example is based on the Active Directory Domain environment like follows.
|
+----------------------+ | +----------------------+
| [ fd3s.srv.world ] |10.0.0.100 | 10.0.0.101| [ rx-7.srv.world ] |
| Active Directory +-----------+-----------+ File Server #1 |
| | | | DFS Replication |
+----------------------+ | +----------------------+
|
| +----------------------+
| 10.0.0.102| [ rx-8.srv.world ] |
+-----------+ File Server #2 |
| DFS Replication |
+----------------------+
[1] Run PowerShell with Admin Privilege and Install DFS Replication.
Install it on all DFS Replication servers.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
This example is based on the Active Directory Domain environment like follows.
|
+----------------------+ | +----------------------+
| [ fd3s.srv.world ] |10.0.0.100 | 10.0.0.101| [ rx-7.srv.world ] |
| Active Directory +-----------+-----------+ File Server #1 |
| | | | DFS Replication |
+----------------------+ | +----------------------+
|
| +----------------------+
| 10.0.0.102| [ rx-8.srv.world ] |
+-----------+ File Server #2 |
| DFS Replication |
+----------------------+
[1] Run PowerShell with Admin Privilege and Configure DFS Replication on the branch (source) server
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
GroupName : RepGroup01
DomainName : srv.world
Identifier : 25fd44e0-899c-4a75-b252-2d338c1b2cb6
Description :
State : Normal
GroupName : RepGroup01
ComputerName : RX-7
DomainName : srv.world
Identifier : 3ca523d1-a643-4aff-a262-c78556f1dcb1
Description :
DnsName : rx-7.srv.world
Site : Default-First-Site-Name
NumberOfConnections :0
NumberOfInboundConnections : 0
NumberOfOutboundConnections : 0
NumberOfInterSiteConnections : 0
NumberOfIntraSiteConnections : 0
IsClusterNode : False
State : Normal
GroupName : RepGroup01
ComputerName : RX-8
DomainName : srv.world
Identifier : aa06c01c-897f-4f7d-aa02-51a109036ce3
Description :
DnsName : rx-8.srv.world
Site : Default-First-Site-Name
NumberOfConnections :0
NumberOfInboundConnections : 0
NumberOfOutboundConnections : 0
NumberOfInterSiteConnections : 0
NumberOfIntraSiteConnections : 0
IsClusterNode : False
State : Normal
GroupName : RepGroup01
SourceComputerName : RX-7
DestinationComputerName : RX-8
DomainName : srv.world
Identifier : 6ce50a3d-509b-40d2-96bf-ab337dddcfca
Enabled : True
RdcEnabled : True
CrossFileRdcEnabled : True
Description :
MinimumRDCFileSizeInKB : 64
State : Normal
GroupName : RepGroup01
SourceComputerName : RX-8
DestinationComputerName : RX-7
DomainName : srv.world
Identifier : 7e524f48-fff4-4492-835d-9698b1331e0d
Enabled : True
RdcEnabled : True
CrossFileRdcEnabled : True
Description :
MinimumRDCFileSizeInKB : 64
State : Normal
GroupName : RepGroup01
FolderName : Replica01
DomainName : srv.world
Identifier : 178de091-7cb1-4fe7-b479-393fbcb7e5e3
Description :
FileNameToExclude : {~*, *.bak, *.tmp}
DirectoryNameToExclude : {}
DfsnPath :
IsDfsnPathPublished : False
State : Normal
GroupName : RepGroup01
ComputerName : RX-7
FolderName : Replica01
GroupDomainName : srv.world
ComputerDomainName : srv.world
Identifier : 0e5199cc-9e4c-4141-bee9-b5c3d46f2e46
DistinguishedName : CN=178de091-7cb1-4fe7-b479-393fbcb7e5e3,CN=affc6a48-ed0b-4f33-a
ngs,CN=RX-7,CN=Computers,DC=srv,DC=world
ContentPath : D:\Replica01
PrimaryMember : True
StagingPath : D:\Replica01\DfsrPrivate\Staging
StagingPathQuotaInMB : 4096
MinimumFileStagingSize : Size256KB
ConflictAndDeletedPath : D:\Replica01\DfsrPrivate\ConflictAndDeleted
ConflictAndDeletedQuotaInMB : 4096
ReadOnly : False
RemoveDeletedFiles : False
Enabled : True
DfsnPath :
State : Normal
GroupName : RepGroup01
ComputerName : RX-8
FolderName : Replica01
GroupDomainName : srv.world
ComputerDomainName : srv.world
Identifier : f802270c-5980-4e18-b1e1-567d1cee77f0
DistinguishedName : CN=d200b467-caeb-42fa-9f2c-9a025972dd4b,CN=e70178af-00c6-4d92-
ings,CN=RX-8,CN=Computers,DC=srv,DC=world
ContentPath : D:\Replica01
PrimaryMember : False
StagingPath : D:\Replica01\DfsrPrivate\Staging
StagingPathQuotaInMB : 4096
MinimumFileStagingSize : Size256KB
ConflictAndDeletedPath : D:\Replica01\DfsrPrivate\ConflictAndDeleted
ConflictAndDeletedQuotaInMB : 4096
ReadOnly : False
RemoveDeletedFiles : False
Enabled : True
DfsnPath :
State : Normal
Directory: D:\Replica01
Directory: D:\Replica01
PS C:\Users\serverworld> ls D:\Replica01\testfolder
Directory: D:\Replica01\testfolder
[3] Right click the [Replication] on the left pane and open the [New Replication Group] on the menu.
[4] For simply 2 server's replication group, check a box [Replication group for data collection].
If you'd like to use more than 3 servers or use advansed configuration options even if 2s servers, c
(proceed with [Replication group for data collection] on this example)
[5] Input any replication group name and description and click [Next] button.
[6] Specify the branch (source) server for replication and click [Next] button.
[7] Specify the replicated folders on the branch server, click [Add] button.
[9] Specify the hub (destination) server for replication and click [Next] button.
[10] Specify the target folders on the hub server for replication.
[11] Specify the replication schedule and bandwidth. By default settings, repliation task is always enab
changes are detected in the target folders and also full bandwidth is used. If you'd like to set spe
configure them with the lower option.
[13] That's OK if all tasks are [Success], click [Close] button to finish.
[15] Verify settings to put files or folders on the tgarget replication folders.
1. Email: bienbien.it@gmail.com