bugfix: exception while adding a secondary DNS zone
This commit is contained in:
parent
ca41b9907b
commit
e6c81e844d
1 changed files with 5 additions and 6 deletions
|
@ -188,17 +188,16 @@ namespace WebsitePanel.Providers.DNS
|
|||
Log.WriteEnd( "Add_DnsServerPrimaryZone" );
|
||||
}
|
||||
|
||||
/// <summary>Call Add-DnsServerSecondaryZone cmdlet</summary>
|
||||
/// <param name="ps"></param>
|
||||
/// <param name="zoneName">a name of a zone</param>
|
||||
/// <param name="masterServers">an array of IP addresses of the master servers of the zone. You can use both IPv4 and IPv6.</param>
|
||||
public static void Add_DnsServerSecondaryZone( this PowerShellHelper ps, string zoneName, string[] masterServers )
|
||||
{
|
||||
// Add-DnsServerSecondaryZone -Name zzz.com -ZoneFile zzz.com.dns
|
||||
// Add-DnsServerSecondaryZone -Name zzz.com -ZoneFile zzz.com.dns -MasterServers ...
|
||||
var cmd = new Command( "Add-DnsServerSecondaryZone" );
|
||||
cmd.addParam( "Name", zoneName );
|
||||
cmd.addParam( "ZoneFile", zoneName + ".dns" );
|
||||
ps.RunPipeline( cmd );
|
||||
|
||||
// Set-DnsServerSecondaryZone -Name zzz.com -MasterServers ...
|
||||
cmd = new Command( "Set-DnsServerSecondaryZone" );
|
||||
cmd.addParam( "Name", zoneName );
|
||||
cmd.addParam( "MasterServers", masterServers );
|
||||
ps.RunPipeline( cmd );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue