Examples/Resources/DFSReplicationGroup/2-DFSReplicationGroup_Simple_Config.ps1
<#PSScriptInfo
.VERSION 1.0.0 .GUID d5b27b97-bebc-4edf-adb8-0846f9be4807 .AUTHOR Microsoft Corporation .COMPANYNAME Microsoft Corporation .COPYRIGHT .TAGS DSCConfiguration .LICENSEURI https://github.com/PowerShell/DfsDsc/blob/master/LICENSE .PROJECTURI https://github.com/PowerShell/DfsDsc .ICONURI .EXTERNALMODULEDEPENDENCIES .REQUIREDSCRIPTS .EXTERNALSCRIPTDEPENDENCIES .RELEASENOTES First version. .PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core #> #Requires -module DfsDsc <# .DESCRIPTION Create a DFS Replication Group called Public containing two members, FileServer1 and FileServer2. The Replication Group contains two folders called Software and Misc. An automatic Full Mesh connection topology will be assigned. The Content Paths for each folder and member will be set to 'd:\public\software' and 'd:\public\misc' respectively. #> Configuration DFSReplicationGroup_Simple_Config { param ( [Parameter()] [PSCredential] $Credential ) Import-DscResource -Module DFSDsc Node localhost { <# Install the Prerequisite features first Requires Windows Server 2012 R2 Full install #> WindowsFeature RSATDFSMgmtConInstall { Ensure = 'Present' Name = 'RSAT-DFS-Mgmt-Con' } # Configure the Replication Group DFSReplicationGroup RGPublic { GroupName = 'Public' Description = 'Public files for use by all departments' Ensure = 'Present' Members = 'FileServer1','FileServer2' Folders = 'Software','Misc' Topology = 'Fullmesh' ContentPaths = 'd:\public\software','d:\public\misc' PSDSCRunAsCredential = $Credential DependsOn = '[WindowsFeature]RSATDFSMgmtConInstall' } # End of RGPublic Resource } # End of Node } # End of Configuration |