Add/Remove RDS Servers from collection
This commit is contained in:
parent
07efbd695e
commit
f2db06de56
18 changed files with 633 additions and 24 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue