public override void ExecuteCmdlet()
        {
            UnpublishApplicationsResult result = null;

            AliasesListParameter appAlias = new AliasesListParameter()
            {
                AliasesList = new List<string>(Alias)
            };

            if (appAlias.AliasesList.Count == 0)
            {
                if (ShouldProcess(Commands_RemoteApp.UnpublishProgramConfirmationDescription, 
                    Commands_RemoteApp.GenericAreYouSureQuestion, 
                    Commands_RemoteApp.UnpublishProgramCaptionMessage))
                {
                    result = CallClient(() => Client.Publishing.UnpublishAll(CollectionName), Client.Publishing);
                }
            }
            else
            {
                appAlias.AliasesList = new List<string>(Alias);
                result = CallClient(() => Client.Publishing.Unpublish(CollectionName, appAlias), Client.Publishing);
            }

            if (result != null && result.ResultList != null)
            {
                WriteObject(result.ResultList, true);
            }
        }
 /// <summary>
 /// Unpublishes published applications matching the given list of
 /// application aliases (short unique names) from the collection.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.RemoteApp.IPublishingOperations.
 /// </param>
 /// <param name='collectionName'>
 /// Required. Collection Name
 /// </param>
 /// <param name='aliasesList'>
 /// Required. List of application aliases to be unpublished
 /// </param>
 /// <returns>
 /// Definition for result of UnpublishApplications operation.
 /// </returns>
 public static Task<UnpublishApplicationsResult> UnpublishAsync(this IPublishingOperations operations, string collectionName, AliasesListParameter aliasesList)
 {
     return operations.UnpublishAsync(collectionName, aliasesList, CancellationToken.None);
 }
 /// <summary>
 /// Unpublishes published applications matching the given list of
 /// application aliases (short unique names) from the collection.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.RemoteApp.IPublishingOperations.
 /// </param>
 /// <param name='collectionName'>
 /// Required. Collection Name
 /// </param>
 /// <param name='aliasesList'>
 /// Required. List of application aliases to be unpublished
 /// </param>
 /// <returns>
 /// Definition for result of UnpublishApplications operation.
 /// </returns>
 public static UnpublishApplicationsResult Unpublish(this IPublishingOperations operations, string collectionName, AliasesListParameter aliasesList)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IPublishingOperations)s).UnpublishAsync(collectionName, aliasesList);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }