public override void ExecuteCmdlet()
        {
            base.ExecuteCmdlet();

            ExecuteClientAction(() =>
            {
                var parameters = new VirtualMachineImageListPublishersParameters
                {
                    Location = Location.Canonicalize()
                };

                VirtualMachineImageResourceList result = this.VirtualMachineImageClient.ListPublishers(parameters);

                var images = from r in result.Resources
                             select new PSVirtualMachineImagePublisher
                             {
                                 RequestId = result.RequestId,
                                 StatusCode = result.StatusCode,
                                 Id = r.Id,
                                 Location = r.Location,
                                 PublisherName = r.Name
                             };

                WriteObject(images, true);
            });
        }
 /// <summary>
 /// Gets a list of virtual machine image publishers.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Compute.IVirtualMachineImageOperations.
 /// </param>
 /// <param name='parameters'>
 /// Optional.
 /// </param>
 /// <returns>
 /// A list of virtual machine image resource information.
 /// </returns>
 public static Task<VirtualMachineImageResourceList> ListPublishersAsync(this IVirtualMachineImageOperations operations, VirtualMachineImageListPublishersParameters parameters)
 {
     return operations.ListPublishersAsync(parameters, CancellationToken.None);
 }
 /// <summary>
 /// Gets a list of virtual machine image publishers.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Compute.IVirtualMachineImageOperations.
 /// </param>
 /// <param name='parameters'>
 /// Optional.
 /// </param>
 /// <returns>
 /// A list of virtual machine image resource information.
 /// </returns>
 public static VirtualMachineImageResourceList ListPublishers(this IVirtualMachineImageOperations operations, VirtualMachineImageListPublishersParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IVirtualMachineImageOperations)s).ListPublishersAsync(parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }