Add/Remove RDS Servers from collection

This commit is contained in:
vfedosevich 2014-12-15 04:41:12 -08:00
parent 07efbd695e
commit f2db06de56
18 changed files with 633 additions and 24 deletions

View file

@ -169,6 +169,35 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
#region RDS Collections
public bool AddRdsServersToDeployment(RdsServer[] servers)
{
var result = true;
Runspace runSpace = null;
try
{
runSpace = OpenRunspace();
foreach (var server in servers)
{
if (!ExistRdsServerInDeployment(runSpace, server))
{
AddRdsServerToDeployment(runSpace, server);
}
}
}
catch (Exception e)
{
result = false;
}
finally
{
CloseRunspace(runSpace);
}
return result;
}
public bool CreateCollection(string organizationId, RdsCollection collection)
{
var result = true;