Merge
This commit is contained in:
commit
dcb235082e
1 changed files with 7 additions and 7 deletions
|
@ -55,7 +55,8 @@ namespace WebsitePanel.Providers.DNS
|
||||||
/// <returns>Same command</returns>
|
/// <returns>Same command</returns>
|
||||||
private static Command addParam( this Command cmd, string name )
|
private static Command addParam( this Command cmd, string name )
|
||||||
{
|
{
|
||||||
cmd.Parameters.Add( name );
|
// http://stackoverflow.com/a/10304080/126995
|
||||||
|
cmd.Parameters.Add( name, true );
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,17 +188,16 @@ namespace WebsitePanel.Providers.DNS
|
||||||
Log.WriteEnd( "Add_DnsServerPrimaryZone" );
|
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 )
|
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" );
|
var cmd = new Command( "Add-DnsServerSecondaryZone" );
|
||||||
cmd.addParam( "Name", zoneName );
|
cmd.addParam( "Name", zoneName );
|
||||||
cmd.addParam( "ZoneFile", zoneName + ".dns" );
|
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 );
|
cmd.addParam( "MasterServers", masterServers );
|
||||||
ps.RunPipeline( cmd );
|
ps.RunPipeline( cmd );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue