You are on page 1of 86

Technical document – System administration

Windows Server 2019 : File Server


• (01) Install File Server
• (02) Set Network File Sharing
• (03) Set Network File Sharing (Advanced)
• (04) Access to Share Folder
• (05) Configure SMB Multi Channel
• (06) Install Resource Manager
• (07) Set Quotas
• (08) Set auto apply Quotas
• (09) Install DFS NameSpace
• (10) Create DFS NameSpaces
• (11) Set Folders to DFS NameSpace
• (12) Install DFS Replication
• (13) Configure DFS Replication
bienbien.it@gmail.com

Build a file server 1|Page


Technical document – System administration

File Server: Install file server role to configure file server.


[1] Run PowerShell with Admin Privilege and Install File Server.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

# install File Server


PS C:\Users\Administrator> Install-WindowsFeature FS-FileServer

Success Restart Needed Exit Code Feature Result


------- -------------- --------- --------------
True No Success {File and iSCSI Services, File Server}

[2] Run [Server Manager] and click [Add roles and features].

[3] Click [Next] button.

Build a file server 2|Page


Technical document – System administration

[4] Select [Role-based or feature-based installation].

Build a file server 3|Page


Technical document – System administration

[5] Select a Host which you'd like to add services.

[6] Check a box [File Server].

Build a file server 4|Page


Technical document – System administration

[7] Click [Next] button.

Build a file server 5|Page


Technical document – System administration

[8] Click [Install] button to begin installation.

[9] After finishing Installation, click [Close] button.

Build a file server 6|Page


Technical document – System administration

Build a file server 7|Page


Technical document – System administration

File Server : Set Network File Sharing

Set Network File and Folder Sharing.


Configure a sharing folder [D:\ShareAll] that everyone can read and write.

[1] Run PowerShell with Admin Privilege and Configure Sharing.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

# create a folder for sharing


PS C:\Users\Administrator> mkdir D:\ShareAll

Directory: D:\

Mode LastWriteTime Length Name


---- ------------- ------ ----
d----- 9/18/2019 9:41 PM ShareAll

# 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"

Name ScopeName Path Description


---- --------- ---- -----------
ShareAll * D:\ShareAll

# grant NTFS permission


PS C:\Users\Administrator> icacls "D:\ShareAll" /grant "Everyone:(OI)(CI)(F)"
processed file: D:\ShareAll
Successfully processed 1 files; Failed processing 0 files

# 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

Build a file server 8|Page


Technical document – System administration

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

File Server : Set Network File Sharing (GUI)

[2] Right-Click the Folder you'd like to set Sharing and Open [Properties].

Build a file server 9|Page


Technical document – System administration

[3] Move to [Sharing] Tab and Click [Share...] button.

[4] Select users or groups you allow to access to Sharing. On this example, select [Everyone].

Build a file server 10 | P a g e


Technical document – System administration

[5] Select Access permission for the users or groups you set. On this example, select [Read/Write].

Build a file server 11 | P a g e


Technical document – System administration

[6] This is the setting of Network discovery and file sharing. Select the one for your
requirements. On this example, select [No, *****].

[7] Sharing has been configured.

Build a file server 12 | P a g e


Technical document – System administration

[8] To configure with [Share...] button, NTFS access permission is also configured automatically.
(on this example, Everyone:FullControl has been set)

Build a file server 13 | P a g e


Technical document – System administration

Build a file server 14 | P a g e


Technical document – System administration

File Server : Set File Sharing (Advanced)

Set Network File and Folder Sharing.


On this example, Configure a sharing folder [D:\Share01] that only users that are in [DevGroup01]

Run PowerShell with Admin Privilege and Configure Sharing.


[1]

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

# create a group
PS C:\Users\Administrator> New-LocalGroup -Name "DevGroup01"

Name Description
---- -----------
DevGroup01

# add a user to the group


PS C:\Users\Administrator> Add-LocalGroupMember -Group "DevGroup01" -Member "
Serverworld"

# create a folder for sharing


PS C:\Users\Administrator> mkdir D:\Share01

Directory: D:\

Mode LastWriteTime Length Name


---- ------------- ------ ----
d----- 9/17/2019 7:20 PM Share01

# 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"

Name ScopeName Path Description


---- --------- ---- -----------
Share01 * D:\Share01

# grant NTFS permission


PS C:\Users\Administrator> icacls "D:\Share01" /grant "DevGroup01:(OI)(CI)(F)"

Build a file server 15 | P a g e


Technical document – System administration

processed file: D:\Share01


Successfully processed 1 files; Failed processing 0 files

# 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)

Successfully processed 1 files; Failed processing 0 files

# remove unnecessary permissions


# disable inheritance first
PS C:\Users\Administrator> icacls "D:\Share01" /inheritance:d
processed file: D:\Share01
Successfully processed 1 files; Failed processing 0 files

# remove unnecessary permissions (example blow, remove Users persmissions all)


PS C:\Users\Administrator> icacls "D:\Share01" /remove "Users"
processed file: D:\Share01
Successfully processed 1 files; Failed processing 0 files

# 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)

Successfully processed 1 files; Failed processing 0 files

File Server : Set File Sharing (Advanced) (GUI)

On GUI configuration, set like follows.

[2] Add Users or Groups you allow to access to Sharing. On this example, Add [DevGroup01] for Shar
refer to here.

Build a file server 16 | P a g e


Technical document – System administration

[3] Right-Click the Folder you'd like to set Sharing and Open [Properties]. Next, move to
[Sharing] tab and Click [Advanced Sharing] button.

Build a file server 17 | P a g e


Technical document – System administration

[4] Check a box [Share this folder] and input any Share name you like on [Share
name] field. Next, Click [Permissions] button.

Build a file server 18 | P a g e


Technical document – System administration

[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.

Build a file server 19 | P a g e


Technical document – System administration

[6] Input user or group you'd like to add permissions.

Build a file server 20 | P a g e


Technical document – System administration

[7] Set permissions for user or group just added.

[8] Click [OK] to finish sharing settings.

Build a file server 21 | P a g e


Technical document – System administration

[9] Back to the [Properties] window, then Click [Security] tab to move to add NTFS access
permissions, too.

Build a file server 22 | P a g e


Technical document – System administration

[10] Set NTFS permissions, Click [Advanced] button.

Build a file server 23 | P a g e


Technical document – System administration

[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 ***].

Build a file server 24 | P a g e


Technical document – System administration

[13] Click [Remove] button to remove unnecessary permissions like Users first, next, Click
[Add] button to add necessary permissions.

Build a file server 25 | P a g e


Technical document – System administration

[14] This is the window for setting permissions. Click [Select a principal] link.

Build a file server 26 | P a g e


Technical document – System administration

[15] Input user or group you'd like to add permissions.

[16] Check boxies you'd like to set permissions.

Build a file server 27 | P a g e


Technical document – System administration

[17] After setting necessary permissons, Click [OK] to finish settings. That's OK all.

Build a file server 28 | P a g e


Technical document – System administration

Build a file server 29 | P a g e


Technical document – System administration

File Server : Access to Share

Access to Share folder from Client Computer. This example is on Windows 10.

[1] Run PowerShell and configure.


If you'd like to access to Share folder even from Explorer on GUI after setting accesses to Share on
without admin Privilege. Because Security Context added on PowerShell (or Command Prompt) w
on GUI with common user authority are different, so mounted Share folder with admin Privilege w
with common user authority.

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

### with New-SmbMapping


# -LocalPath [drive letter]
# -RemotePath [\\(Server name)\(Share name)]
# -UserName [authenticated username] -Password [password]
# -Persistent [$true|$false]
# $true means enabled, $false means mapping is valid only on current session
PS C:\Users\serverworld> New-SmbMapping -LocalPath "Z:" `
-RemotePath "\\rx-7.srv.world\Share01" `
-UserName "Serverworld" -Password "P@ssw0rd01" `
-Persistent $true

# confirm
PS C:\Users\serverworld> Get-SmbMapping

Status Local Path Remote Path


------ ---------- -----------
OK Z: \\rx-7.srv.world\Share01

PS C:\Users\serverworld> ls Z:\

Directory: Z:\

Mode LastWriteTime Length Name

Build a file server 30 | P a g e


Technical document – System administration

---- ------------- ------ ----


d----- 2019/09/18 19:46 new folder
-a---- 2019/09/18 21:03 0 new text.txt
-a---- 2019/09/18 20:02 16 testfile.txt

# to disconnect Share, run like follows


PS C:\Users\serverworld> Remove-SmbMapping -LocalPath "Z:"

### with New-PSDrive


# -Name [any drive name you like]
# if you set drive persistently with [-Persist], it needs to specify drive letter like "Z:", "Y:" a
nd so on)
# -PSProvider [FileSystem]
# if filesystem, specify [FileSystem], but if registry, specify [Registry]
# -Root [\\(Server name)\(Share name)]
# -Credential (specify authenticated username/password)]
# example below uses a user (Serverworld/P@ssw0rd01)
# -Persist (if with this option, mapping keeps persistently, if not specify, mapping is valid o
nly on current session)
PS C:\Users\serverworld> New-PSDrive -Name "Share01" `
-PSProvider FileSystem `
-Root "\\rx-7.srv.world\Share01" `
-Credential (New-Object PSCredential("Serverworld", (ConvertTo-SecureString -AsPlainTex
t "P@ssw0rd01" -Force)))

# confirm
PS C:\Users\serverworld> Get-PSDrive -Name "Share01" | Format-Table -AutoSize

Name Used (GB) Free (GB) Provider Root CurrentLocation


---- --------- --------- -------- ---- ---------------
Share01 FileSystem \\rx-7.srv.world\Share01

PS C:\Users\serverworld> ls Share01:\

Directory: \\rx-7.srv.world\Share01

Mode LastWriteTime Length Name


---- ------------- ------ ----
d----- 2019/09/18 10:46 new folder
-a---- 2019/09/18 13:03 0 new text.txt
-a---- 2019/09/18 11:02 16 testfile.txt

# to disconnect Share, run like follows


PS C:\Users\serverworld> Remove-PSDrive "Share01"

Build a file server 31 | P a g e


Technical document – System administration

### with net use


# net use [drive letter (optional)] [\\(Server name)\(Share name)] [/user:(username)] [passw
ord (if not specified, need to input intaractively)] [/persistent:(yes|no) (default is [Yes])]
PS C:\Users\serverworld> net use "\\rx-7.srv.world\Share01" /user:Serverworld P@ssw0rd0
1 /persistent:no
The command completed successfully.

PS C:\Users\serverworld> ls "\\rx-7.srv.world\Share01"

Directory: \\rx-7.srv.world\Share01

Mode LastWriteTime Length Name


---- ------------- ------ ----
d----- 2019/09/18 10:46 new folder
-a---- 2019/09/18 13:03 0 new text.txt
-a---- 2019/09/18 11:02 16 testfile.txt

# to disconnect Share, run like follows


PS C:\Users\serverworld> net use "\\rx-7.srv.world\Share01" /delete

File Server : Access to Share (GUI)

On GUI accessing, set like follows.

[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].

Build a file server 32 | P a g e


Technical document – System administration

[3] Select drive letter on [Drive] field, and Input Share folder Path like [\\(Server
name)\(Share Name)], then Click [Finish] button.

Build a file server 33 | P a g e


Technical document – System administration

[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é

Build a file server 34 | P a g e


Technical document – System administration

[5] Just accessed to Share folder. Try to read or write files or folders to verify settings.

Build a file server 35 | P a g e


Technical document – System administration

[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)].

[7] Authenticate with a user that is allowed to access to Share folder.


(but on specific cases as writing in [4], this form is not shown)

Build a file server 36 | P a g e


Technical document – System administration

[8] Just accessed to Share folder.

Build a file server 37 | P a g e


Technical document – System administration

Build a file server 38 | P a g e


Technical document – System administration

File Server : Configure SMB Multi Channel


2020/12/28

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.

* Network adopters support RSS (Receive Side Scaling)


* Network adopters are grouped with NIC Teaming
* Network adopters support RDMA (Remote Direct Memory Access)

Refer to more details follows.

⇒ 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.

# confirm the feature is enabled or not (enabled by default)


PS C:\Users\Administrator> Get-SmbServerConfiguration | Out-String -Stream | Select-String
"EnableMultiChannel"

EnableMultiChannel : True

# if disabled, enable like follows


PS C:\Users\Administrator> Set-SmbServerConfiguration -EnableMultiChannel $True

# confirm network interfaces


PS C:\Users\Administrator> Get-SmbServerNetworkInterface

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

# set Multi Channel


# -ServerName : (hostname)
# -InterfaceIndex : (network interface to be used)
PS C:\Users\Administrator> New-SmbMultichannelConstraint -ServerName "rx-7" -InterfaceI
ndex 3, 7 -Force

Build a file server 39 | P a g e


Technical document – System administration

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 :

# if remove settings, configure like follows


PS C:\Users\Administrator> Remove-SmbMultichannelConstraint -ServerName "rx-7"

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

Build a file server 40 | P a g e


Technical document – System administration

[2] Verify file transfer speed to access to the target file service from any client computer.

Build a file server 41 | P a g e


Technical document – System administration

File Server : Install Resource Manager


Install File Server Resource Manager that enables high level managements for resources on File Se

[1] Run PowerShell with Admin Privilege and Install.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

# install Resource Manager with admin tools


PS C:\Users\Administrator> Install-WindowsFeature FS-Resource-Manager -IncludeManagem
entTools

Success Restart Needed Exit Code Feature Result


------- -------------- --------- --------------
True No Success {File Server Resource Manager, Remote Serv...

File Server : Install Resource Manager (GUI)

On GUI installation, set like follows.

[2] Refer to the installation procedure of [Add roles and features].


For a different point of installing Resource Manager, Select [File Server Resource Manager]
on [Select server roles] section like follows.

Build a file server 42 | P a g e


Technical document – System administration

Build a file server 43 | P a g e


Technical document – System administration

Build a file server 44 | P a g e


Technical document – System administration

File Server : Set Quotas

Set Quotas to Volumes or Folders on File Server.


Install File Server Resource Manager first, refer to here.

[1] Run PowerShell with Admin Privilege and Configure.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users\Administrator> Get-SmbShare

Name ScopeName Path Description


---- --------- ---- -----------
ADMIN$ * C:\Windows Remote Admin
C$ * C:\ Default share
D$ * D:\ Default share
IPC$ * Remote IPC
Share01 * D:\Share01
ShareAll * D:\ShareAll

# display templates of Quota


PS C:\Users\Administrator> Get-FsrmQuotaTemplate

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 :

Build a file server 45 | P a g e


Technical document – System administration

.....
.....

# for example, apply 2GB hard limit template to [Share01] folder


PS C:\Users\Administrator> New-FsrmQuota -Path "D:\Share01" -Description "limit usage to
2 GB based on template" -Template "2 GB Limit"

Description : limit usage to 2 GB based on template


Disabled : False
MatchesTemplate : True
Path : D:\Share01
PeakUsage : 3072
Size : 2147483648
SoftLimit : False
Template : 2 GB Limit
Threshold : {MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold, MSFT_FSRMQuot
aThreshold}
Usage : 3072
PSComputerName :

# if disable applied Quota temporally, set like follows


PS C:\Users\Administrator> Set-FsrmQuota -Path "D:\Share01" -Disabled:$true

# if enable disabled Quota, set like follows


PS C:\Users\Administrator> Set-FsrmQuota -Path "D:\Share01" -Disabled:$false

# to remove added Quota entry, set like follows


PS C:\Users\Administrator> Remove-FsrmQuota -Path "D:\Share01"

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

File Server : Set Quotas (GUI)

On GUI configuration, set like follows.

[2] Run [Start] - [Server Manager] - [Tools] - [File Server Resource Manager].

Build a file server 46 | P a g e


Technical document – System administration

[3] Select [Quotas] on the left pane and right-click it, then Open [Create Quota].

Build a file server 47 | P a g e


Technical document – System administration

[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)

[5] Confirm selections and if that's OK, Click [Create] button.

Build a file server 48 | P a g e


Technical document – System administration

[6] Quota entry has just been added.

Build a file server 49 | P a g e


Technical document – System administration

[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.

Build a file server 50 | P a g e


Technical document – System administration

File Server : Set auto apply Quotas

Set auto applied Quota settings to Volumes or Folders on File Server.


If configured auto apply Quota to a folder, Quota template is set to subfolders (existing and new o
not applied to subfolders in subfolders, it's not recursively)
Install File Server Resource Manager first, refer to here.

[1] Run PowerShell with Admin Privilege and Configure.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users\Administrator> Get-SmbShare

Name ScopeName Path Description


---- --------- ---- -----------
ADMIN$ * C:\Windows Remote Admin
C$ * C:\ Default share
D$ * D:\ Default share
IPC$ * Remote IPC
Share01 * D:\Share01
Share02 * D:\Share02
ShareAll * D:\ShareAll

# display templates of Quota


PS C:\Users\Administrator> Get-FsrmQuotaTemplate

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}

Build a file server 51 | P a g e


Technical document – System administration

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 :

# if disable auto apply Quota temporally, set like follows


PS C:\Users\Administrator> Set-FsrmAutoQuota -Path "D:\Share02" -Disabled:$true

# if enable disabled auto apply Quota, set like follows


PS C:\Users\Administrator> Set-FsrmAutoQuota -Path "D:\Share02" -Disabled:$false

# to remove added auto apply Quota entry, set like follows


PS C:\Users\Administrator> Remove-FsrmAutoQuota -Path "D:\Share02"

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

File Server : Set auto apply Quotas (GUI)

On GUI configuration, set like follows.

[2] Run [Start] - [Server Manager] - [Tools] - [File Server Resource Manager].

Build a file server 52 | P a g e


Technical document – System administration

[3] Select [Quotas] on the left pane and right-click it, then Open [Create Quota].

Build a file server 53 | P a g e


Technical document – System administration

[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.

[5] Confirm selections and if that's OK, Click [Create] button.

Build a file server 54 | P a g e


Technical document – System administration

[6] Auto apply Quota entry has just been added.

Build a file server 55 | P a g e


Technical document – System administration

[7] For auto apply Quota setting, each subfolder under the folder you set auto apply Quota are show

Build a file server 56 | P a g e


Technical document – System administration

File Server : Install DFS NameSpace

Install DFS (Distributed File System) NameSpace feature.


It's possible to set multiple servers' shared folder under a root shared folder with DFS NameSpace

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 |
| |
+----------------------+

[1] Run PowerShell with Admin Privilege and Install.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

# install DFS NameSpace with admin tools


PS C:\Users\Administrator> Install-WindowsFeature FS-DFS-Namespace -IncludeManagementTools

Success Restart Needed Exit Code Feature Result


------- -------------- --------- --------------
True No Success {DFS Namespaces, Remote Server Administrat...

File Server : Install DFS NameSpace (GUI)

On GUI installation, set like follows.

[2] Refer to here for installation procedure.


Only a different point, select the [DFS Namespaces] on feature section like follows.

Build a file server 57 | P a g e


Technical document – System administration

Build a file server 58 | P a g e


Technical document – System administration

File Server : Create DFS NameSpaces

Create DFS NameSpaces.


It's possible to set multiple servers' shared folder under a root shared folder with DFS NameSpace

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 |
| |
+----------------------+

[1] Run PowerShell with Admin Privilege and Configure.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

# create a root folder for DFS Namespace share


PS C:\Users\serverworld> mkdir C:\DFSRoots\Share

# set smbshare for DFS Namespace


PS C:\Users\serverworld> New-SmbShare –Name 'Share' –Path 'C:\DFSRoots\Share' -FullAccess 'Ever

Name ScopeName Path Description


---- --------- ---- -----------
Share * C:\DFSRoots\Share

# create DFS namespace


# -Path (path of share)
# -Type (Standalone | DomainV1 | DomainV2)
# -TargetPath (target share path : the one created above)
PS C:\Users\serverworld> New-DfsnRoot -Path '\\srv.world\Share' -Type DomainV2 -TargetPath '\\rx

Path Type Properties TimeToLiveSec State Description


---- ---- ---------- ------------- ----- -----------
\\srv.world\Share Domain V2 300 Online

Build a file server 59 | P a g e


Technical document – System administration

# 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

File Server : Create DFS NameSpaces (GUI)

On GUI configuration, set like follows.

[2] Run [Start] - [Server Manager] - [Tools] - [DFS Management].

[3] Right click the [Namespaces] on the left pane and open the [New Namespaces] on the menu.

Build a file server 60 | P a g e


Technical document – System administration

[4] Set server's hostname you'd like to set DFS Namespaces and click [Next] button.

Build a file server 61 | P a g e


Technical document – System administration

[5] Set share name for DFS Namespaces.

[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.

Build a file server 62 | P a g e


Technical document – System administration

[7] Click [Create] button.

Build a file server 63 | P a g e


Technical document – System administration

[8] After successfully creation, Click [Close] button.

[9] Created Namespaces are listed under the [Namespaces] section.

Build a file server 64 | P a g e


Technical document – System administration

Build a file server 65 | P a g e


Technical document – System administration

File Server : Set Folders to DFS NameSpace

Set Folders to DFS NameSpace.


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 |
| |
+----------------------+

[1] Run PowerShell with Admin Privilege and Configure.


On the example below, Configure the shared folder [\\rx-7\Share01] as [\\srv.world\Share\Folder0
[\\srv.world\Share\Folder02] to the Namespace [\\srv.world\Share].

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

# set [\\rx-7\Share01] as [\\srv.world\Share\Folder01]


PS C:\Users\serverworld> New-DfsnFolder -Path "\\srv.world\Share\Folder01" -TargetPath "\\rx-7\Sh

Path State TimeToLiveSec Properties Description


---- ----- ------------- ---------- -----------
\\srv.world\Share\Folder01 Online 300

# set [\\rx-8\Share02] as [\\srv.world\Share\Folder02]


PS C:\Users\serverworld> New-DfsnFolder -Path "\\srv.world\Share\Folder02" -TargetPath "\\rx-8\Sh

Path State TimeToLiveSec Properties Description


---- ----- ------------- ---------- -----------
\\srv.world\Share\Folder02 Online 300

# confirm settings
PS C:\Users\serverworld> Get-DfsnFolder -Path '\\srv.world\Share\*'

Path State TimeToLiveSec Properties Description


---- ----- ------------- ---------- -----------

Build a file server 66 | P a g e


Technical document – System administration

\\srv.world\Share\Folder01 Online 300


\\srv.world\Share\Folder02 Online 300

File Server : Set Folders to DFS NameSpace (GUI)

On GUI configuration, set like follows.

[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.

Build a file server 67 | P a g e


Technical document – System administration

[4] After settings shared folders, they are listed. Next, verify to access to the DFS Namespace root fro
same AD domain.

Build a file server 68 | P a g e


Technical document – System administration

Build a file server 69 | P a g e


Technical document – System administration

File Server : Install DFS Replication

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.

# install DFS Replication with admin tools


PS C:\Users\Administrator> Install-WindowsFeature FS-DFS-Replication -IncludeManagementTools

Success Restart Needed Exit Code Feature Result


------- -------------- --------- --------------
True No Success {DFS Replication, Remote Server Administra...

File Server : Install DFS Replication (GUI)

On GUI installation, set like follows.

[2] Refer to here for installation procedure.


Only a different point, select the [DFS Replication] on feature section like follows.

Build a file server 70 | P a g e


Technical document – System administration

Build a file server 71 | P a g e


Technical document – System administration

File Server : Configure DFS Replication

Configure DFS Replication groups.


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 Configure DFS Replication on the branch (source) server

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

# create a DFS replication group (any name are OK)


PS C:\Users\serverworld> New-DfsReplicationGroup -GroupName "RepGroup01"

GroupName : RepGroup01
DomainName : srv.world
Identifier : 25fd44e0-899c-4a75-b252-2d338c1b2cb6
Description :
State : Normal

# set member servers for the replication group


PS C:\Users\serverworld> Add-DfsrMember -GroupName "RepGroup01" -ComputerName "rx-7","rx-

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

Build a file server 72 | P a g e


Technical document – System administration

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

# set a connection between members of the replication group


# -SourceComputerName [branch (source) server]
# -DestinationComputerName [hub (destination) server]
PS C:\Users\serverworld> Add-DfsrConnection -GroupName "RepGroup01" `
-SourceComputerName "rx-7" `
-DestinationComputerName "rx-8"

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

Build a file server 73 | P a g e


Technical document – System administration

DestinationComputerName : RX-7
DomainName : srv.world
Identifier : 7e524f48-fff4-4492-835d-9698b1331e0d
Enabled : True
RdcEnabled : True
CrossFileRdcEnabled : True
Description :
MinimumRDCFileSizeInKB : 64
State : Normal

# create a target folder for replication


PS C:\Users\serverworld> mkdir D:\Replica01

# set folder name (any name are OK)


PS C:\Users\serverworld> New-DfsReplicatedFolder -GroupName "RepGroup01" -FolderName "Repli

GroupName : RepGroup01
FolderName : Replica01
DomainName : srv.world
Identifier : 178de091-7cb1-4fe7-b479-393fbcb7e5e3
Description :
FileNameToExclude : {~*, *.bak, *.tmp}
DirectoryNameToExclude : {}
DfsnPath :
IsDfsnPathPublished : False
State : Normal

# set physical path of the replication folder on the branch server


PS C:\Users\serverworld> Set-DfsrMembership -GroupName "RepGroup01" `
-FolderName "Replica01" `
-ContentPath "D:\Replica01" `
-ComputerName "rx-7" `
-PrimaryMember $True

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

Build a file server 74 | P a g e


Technical document – System administration

StagingPathQuotaInMB : 4096
MinimumFileStagingSize : Size256KB
ConflictAndDeletedPath : D:\Replica01\DfsrPrivate\ConflictAndDeleted
ConflictAndDeletedQuotaInMB : 4096
ReadOnly : False
RemoveDeletedFiles : False
Enabled : True
DfsnPath :
State : Normal

# set physical path of the replication folder on the hub server


PS C:\Users\serverworld> Set-DfsrMembership -GroupName "RepGroup01" `
-FolderName "Replica01" `
-ContentPath "D:\Replica01" `
-ComputerName "rx-8"

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

# confirm current replication state


PS C:\Users\serverworld> Get-DfsrCloneState
Ready

# verify settings to create test files or folders in the replication folder


PS C:\Users\serverworld> mkdir D:\Replica01\testfolder
PS C:\Users\serverworld> echo "Test File" > D:\Replica01\testfile.txt
PS C:\Users\serverworld> ls D:\Replica01

Build a file server 75 | P a g e


Technical document – System administration

Directory: D:\Replica01

Mode LastWriteTime Length Name


---- ------------- ------ ----
d----- 1/14/2021 11:13 PM testfolder
-a---- 1/14/2021 11:12 PM 24 testfile.txt

PS C:\Users\serverworld> ssh rx-8 powershell -c "Get-ChildItem D:\Replica01"


fd3s01\serverworld@rx-8's password:

Directory: D:\Replica01

Mode LastWriteTime Length Name


---- ------------- ------ ----
d----- 1/14/2021 11:13 PM testfolder
-a---- 1/14/2021 11:12 PM 24 testfile.txt

PS C:\Users\serverworld> ssh rx-8 powershell -c "echo 'Replication Test' > D:\Replica01\testfolder\te


fd3s01\serverworld@rx-8's password:

PS C:\Users\serverworld> ls D:\Replica01\testfolder

Directory: D:\Replica01\testfolder

Mode LastWriteTime Length Name


---- ------------- ------ ----
-a---- 1/15/2021 12:15 AM 18 testfile2.txt

File Server : Configure DFS Replication (GUI)

On GUI configuration, set like follows.

[2] Run [Start] - [Server Manager] - [Tools] - [DFS Management].

Build a file server 76 | P a g e


Technical document – System administration

[3] Right click the [Replication] on the left pane and open the [New Replication Group] on the menu.

Build a file server 77 | P a g e


Technical document – System administration

[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.

Build a file server 78 | P a g e


Technical document – System administration

[6] Specify the branch (source) server for replication and click [Next] button.

Build a file server 79 | P a g e


Technical document – System administration

[7] Specify the replicated folders on the branch server, click [Add] button.

[8] Select the path of replicated folders and click [OK].

Build a file server 80 | P a g e


Technical document – System administration

[9] Specify the hub (destination) server for replication and click [Next] button.

Build a file server 81 | P a g e


Technical document – System administration

[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.

Build a file server 82 | P a g e


Technical document – System administration

[12] Confirm selections and click [Create] button if that's OK.

Build a file server 83 | P a g e


Technical document – System administration

[13] That's OK if all tasks are [Success], click [Close] button to finish.

[14] Created replication groups are displayed on the DFS management.

Build a file server 84 | P a g e


Technical document – System administration

[15] Verify settings to put files or folders on the tgarget replication folders.

Build a file server 85 | P a g e


Technical document – System administration

THE END & CONTACT


Thank for reading.

If you have any question, please send to me via

1. Email: bienbien.it@gmail.com

2. Phone: +84 975 27 7603


3. Skype: bienbien.it | Viber: 0975277603 | Zalo: 0975277603

Build a file server 86 | P a g e

You might also like