This project is read-only.

How to set "-SecondaryServers" from string or array variable ?

May 9, 2013 at 2:50 PM
Edited May 9, 2013 at 2:51 PM
Hi,

I have trouble of setting -SecondaryServers from string or array variable.

Typical command:
Get-DnsZone | ?{ $_.ZoneType -eq "Primary" } | % {
Set-DnsZoneTransfer -Identity $_.Identity `
-ZoneTransfer List -SecondaryServers 1.2.3.4, 2.3.4.5, 6.7.8.9 }
Now if i try:

$SecondaryServersList = (1.2.3.4, 2.3.4.5, 6.7.8.9, 10.11.12.13)
#or even
#$SecondaryServersList = "1.2.3.4, 2.3.4.5, 6.7.8.9, 10.11.12.13"

Get-DnsZone | ?{ $_.ZoneType -eq "Primary" } | % {
Set-DnsZoneTransfer -Identity $_.Identity `
-ZoneTransfer List -SecondaryServers $SecondaryServersList }
and i get error "Set-DnsZoneTransfer : Invalid Secondary Server List"