private static AzureHDInsightCluster DisableRdpAccessToCluster(
            IHDInsightCertificateCredential creds, AzureHDInsightCluster containerWithRdpAccessDisabled)
        {
            IManageAzureHDInsightRdpAccessCommand rdpManagementClient =
                ServiceLocator.Instance.Locate <IAzureHDInsightCommandFactory>().CreateManageRdpAccess();

            rdpManagementClient.CurrentSubscription = GetCurrentSubscription();
            rdpManagementClient.RdpCredential       = GetAzurePsCredentials();
            rdpManagementClient.Name     = containerWithRdpAccessDisabled.Name;
            rdpManagementClient.Location = containerWithRdpAccessDisabled.Location;
            rdpManagementClient.Enable   = false;
            rdpManagementClient.EndProcessing();
            return(rdpManagementClient.Output.First());
        }
        private static AzureHDInsightCluster EnableRdpAccessToCluster(
            IHDInsightCertificateCredential creds, AzureHDInsightCluster containerWithRdpAccessDisabled, string rdpUserName, string rdpPassword, DateTime expiry)
        {
            IManageAzureHDInsightRdpAccessCommand rdpManagementClient =
                ServiceLocator.Instance.Locate <IAzureHDInsightCommandFactory>().CreateManageRdpAccess();

            rdpManagementClient.CurrentSubscription = GetCurrentSubscription();
            rdpManagementClient.RdpCredential       = GetPSCredential(rdpUserName, rdpPassword);
            rdpManagementClient.Name            = containerWithRdpAccessDisabled.Name;
            rdpManagementClient.Location        = containerWithRdpAccessDisabled.Location;
            rdpManagementClient.RdpAccessExpiry = expiry;
            rdpManagementClient.Enable          = true;

            rdpManagementClient.EndProcessing();
            return(rdpManagementClient.Output.First());
        }