Thursday, 9 October 2014

Set-DfsnForDR.ps1

It’s been a bit quiet on cosonok.com recently,
partly because of vacations, and partly because I’ve been working on some PowerShell scripts/programs that have
consumed far too much of my time.

Here’s the first one:

Set-DfsnForDR.ps1

This script uses
DFSUTIL to update DFS links (the Server 2012 PowerShell DFSN modules were
trialed, but had issues with the cmdlets timing out and/or being very slow, so
reverted back to Server 2008 DFSUTIL). The script can do the following:

> Set referral priority ordering First Among All
Targets

> Set referral priority ordering Last Among All
Targets

> Set target as Enabled

> Set target as Disabled

It will work
across all the namespaces in a domain and multiple standalone namespaces
at the same time.