protected override void ProcessRecord()
        {
            base.ProcessRecord();

            ExecuteClientAction(() =>
            {
                var parameters = new VirtualMachineImageListSkusParameters
                {
                    Location = Location.Canonicalize(),
                    PublisherName = PublisherName,
                    Offer = Offer
                };

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

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

                WriteObject(images, true);
            });
        }
 /// <summary>
 /// Gets a list of virtual machine image skus.
 /// </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> ListSkusAsync(this IVirtualMachineImageOperations operations, VirtualMachineImageListSkusParameters parameters)
 {
     return operations.ListSkusAsync(parameters, CancellationToken.None);
 }
 /// <summary>
 /// Gets a list of virtual machine image skus.
 /// </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 ListSkus(this IVirtualMachineImageOperations operations, VirtualMachineImageListSkusParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IVirtualMachineImageOperations)s).ListSkusAsync(parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }