Getting DFSR setup with PS
i'm trying automate configuration of dfsr , having tough time. setup pretty straight forward, two dc's holding namespace , 2 member servers dfsr setup. ive read guy quite few times, but i guess i'm missing something; http://blogs.technet.com/b/filecab/archive/2013/08/20/dfs-replication-in-windows-server-2012-r2-if-you-only-knew-the-power-of-the-dark-shell.aspx
i've pulled download , tried tn script, same results; https://gallery.technet.microsoft.com/configure-dfsr-using-162aa873
#create share dfs-n new-item -itemtype directory -path c:\dfsroot new-smbshare -name dfsroot -path c:\dfsroot -fullaccess administrators -readaccess users #create namespace new-dfsnroot -path \\$domainname\dfsroot -targetpath \\$dc1\dfsroot -type domainv2 -enablesitecosting $true new-dfsnroottarget -path \\$domainname\dfsroot -targetpath \\$dc2\dfsroot #add dfs folder share new-dfsnfolder -path \\$domainname\dfsroot\share -targetpath \\$memeber1\share #add secondary server dfs folder share new-dfsnfoldertarget -path \\$domainname\dfsroot\share -targetpath \\$member2\share #add replication group name, folder, memebers , connections share new-dfsreplicationgroup -groupname $domainname\dfsroot\share | new-dfsreplicatedfolder -foldername share | add-dfsrmember -computername "$member1","$member2" add-dfsrconnection -groupname $domainname\dfsroot\share -sourcecomputername $member1 -destinationcomputername $member2 set-dfsrmembership -groupname $domainname\dfsroot\share -foldername share -computername $member1 -contentpath d:\share -stagingpathquotainmb 20960 -conflictanddeletedquotainmb 1024 -primarymember $true -force set-dfsrmembership -groupname $domainname\dfsroot\share -foldername share -computername $member2 -contentpath d:\share -stagingpathquotainmb 20960 -conflictanddeletedquotainmb 1024 -force get-dfsrmember | update-dfsrconfigurationfromad
so when run above code not error out, when double check going dfs gui, namespace folder "share" doesn't show replicated(even though if try try use gui perform same task says share name being used). also, namespace doesn't list published. appreciated, ones been eating lunch , watching tn radio video , reading above articles seems straightforward, im missing something.
running 2012r2 on 4 servers.
the strange thing data replicated between 2 $member servers, gui not work if use powershell setup dfsr? i've torn down , rebuilt setup number of times same results.
props daniel setting me straight on forum.
http://powershell.org/wp/forums/topic/automating-dfsnr-setup/
you need use dfsnpath parameter on new-dfsreplicatedfolder or set-dfsreplicatedfolder connect dfs namespace folder replicated folder. won't happen without using parameter.
new-dfsreplicatedfolder -foldername share -dfsnpath \\$domainname\dfsroot\share
or
set-dfsreplicatedfolder -groupname $domainname\dfsroot\share -dfsnpath \\$domainname\dfsroot\share
Windows Server > Windows PowerShell
Comments
Post a Comment