Download existing marketplace items from Azure and publish to Azure Stack

Applies to: Azure Stack integrated systems and Azure Stack Development Kit

As a cloud operator, you can download items from Azure Marketplace and make them available in Azure Stack. The items you can choose are from a curated list of Azure Marketplace items that are pre-tested and supported to work with Azure Stack. Additional items are frequently added to this list, so continue to check back for new content.

There are two scenarios for connecting to Azure Marketplace:

  • A connected scenario - requires your Azure Stack environment to be connected to the internet. You use the Azure Stack portal to locate and download items.
  • A disconnected or partially connected scenario - requires you to access the internet using the Marketplace syndication tool to download Marketplace items. Then, you transfer your downloads to your disconnected Azure Stack installation. This scenario uses PowerShell.

See Azure Marketplace items for Azure Stack for a complete list of the marketplace items you can download. See the Azure Stack Marketplace changes article for a list of recent additions, deletions, and updates to Azure Stack Marketplace.

Connected scenario

If Azure Stack connects to the internet, you can use the administrator portal to download marketplace items.


Your Azure Stack deployment must have internet connectivity and be registered with Azure.

Use the portal to download marketplace items

  1. Sign in to the Azure Stack administrator portal.

  2. Review the available storage space before downloading marketplace items. Later, when you select items for download, you can compare the download size to your available storage capacity. If capacity is limited, consider options for managing available space.

    To review available space: in Region management, select the region you want to explore and then go to Resource Providers > Storage:

    Review storage space in Azure Stack administrator portal

  3. Open Azure Stack Marketplace and connect to Azure. To do so, select the Marketplace management service, select Marketplace items, and then select Add from Azure:

    Add marketplace items from Azure

  4. The portal displays the list of items available for download from the Azure Marketplace. You can filter products by name, publisher and/or type of product. You can also click on each item to view its description and additional information, including its download size:

    Azure Marketplace items list

  5. Select the item you want, and then select Download. Download times vary.

    Downloading Azure Marketplace item

    After the download completes, you can deploy the new marketplace item as either an Azure Stack operator or a user.

  6. To deploy the downloaded item, select + Create a resource, and then search among the categories for the new marketplace item. Next select the item to begin the deployment process. The process varies for different marketplace items.

Disconnected or a partially connected scenario

If Azure Stack is in a disconnected mode, you use PowerShell and the marketplace syndication tool to download the marketplace items to a machine with internet connectivity. You then transfer the items to your Azure Stack environment. In a disconnected environment, you can't download marketplace items by using the Azure Stack portal.

The marketplace syndication tool can also be used in a connected scenario.

There are two parts to this scenario:

  • Part 1: Download from Azure Marketplace. On the computer with internet access you configure PowerShell, download the syndication tool, and then download items from Azure Marketplace.
  • Part 2: Upload and publish to Azure Stack Marketplace. You move the files you downloaded to your Azure Stack environment, import them to Azure Stack, and then publish them to Azure Stack Marketplace.


  • A connected environment (does not have to be Azure Stack). You need connectivity to get the list of products from Azure with their details, and to download everything locally. Once this is done, the rest of the procedure does not require any internet connectivity. It creates a catalog of items you've previously downloaded for you to use in your disconnected environment.

  • A USB key or external drive to connect to your disconnected environment and transfer all the necessary artifacts.

  • A disconnected Azure Stack environment with the following prerequisites:

  • You must have a storage account in Azure Stack that has a publicly accessible container (which is a storage blob). You use the container as temporary storage for the marketplace items gallery files. If you're not familiar with storage accounts and containers, see Work with blobs - Azure portal in the Azure documentation.

  • The marketplace syndication tool is downloaded during the first procedure.

  • You can install AzCopy for optimal download performance, but it's not required.

Once you have registered, you can disregard the following message that appears on the Marketplace management blade, as this is not relevant for the disconnected use case:

Not registered message

Use the marketplace syndication tool to download marketplace items


Be sure to download the marketplace syndication tool each time you download marketplace items in a disconnected scenario. Frequent changes are made to this script and the most current version should be used for each download.

  1. On a computer with an Internet connection, open a PowerShell console as an administrator.

  2. Add the Azure account that you've used to register Azure Stack. To add the account, in PowerShell run Add-AzureRmAccount without any parameters. You're prompted to enter your Azure account credentials and you might have to use two-factor authentication, depending on your account's configuration.


    If your session expires, your password has changed, or you simply wish to switch accounts, run the following cmdlet before you sign in using Add-AzureRmAccount: Remove-AzureRmAccount-Scope Process

  3. If you have multiple subscriptions, run the following command to select the one you've used for registration:

    Get-AzureRmSubscription -SubscriptionID 'Your Azure Subscription GUID' | Select-AzureRmSubscription
    $AzureContext = Get-AzureRmContext
  4. Download the latest version of the marketplace syndication tool by using the following script:

    # Download the tools archive.
    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    invoke-webrequest `
    # Expand the downloaded files.
    expand-archive `
      -DestinationPath `
    # Change to the tools directory.
    cd .\AzureStack-Tools-master
  5. Import the syndication module and then launch the tool by running the following commands. Replace Destination folder path with a location to store the files you download from Azure Marketplace.

    Import-Module .\Syndication\AzureStack.MarketplaceSyndication.psm1
    Export-AzSOfflineMarketplaceItem -Destination "Destination folder path in quotes"

    Note that Export-AzSOfflineMarketplaceItem has an additional -cloud flag that specifies the cloud environment. By default, it's azurecloud.

  6. When the tool runs, you should see a screen similar to the following image, with the list of available Azure marketplace items:

    Azure Marketplace items popup

  7. If you have not installed the Azure Storage tools, you will get the following message. In order to install these tools, make sure you download AzCopy:

    Storage tools

  8. Select the item that you want to download and make a note of the Version. You can hold the Ctrl key to select multiple images. You reference the version when you import the item in the next procedure.

    You can also filter the list of images by using the Add criteria option.

  9. Select OK, and then review and accept the legal terms.

  10. The time that the download takes depends on the size of the item. After the download completes, the item is available in the folder that you specified in the script. The download includes a VHD file (for virtual machines) or a .zip file (for virtual machine extensions). It might also include a gallery package in the .azpkg format, which is simply a .zip file.

  11. If the download fails, you can try again by re-running the following PowerShell cmdlet:

    Export-AzSOfflineMarketplaceItem -Destination "Destination folder path in quotes"

    Before retrying, remove the product folder in which the download failed. For example, if the download script fails when downloading to D:\downloadFolder\microsoft.customscriptextension-arm-1.9.1, remove the D:\downloadFolder\microsoft.customscriptextension-arm-1.9.1 folder, then rerun the cmdlet.

Import the download and publish to Azure Stack Marketplace using PowerShell

  1. You must move the files that you have previously downloaded locally so that they are available to your Azure Stack environment. The marketplace syndication tool must also be available to your Azure Stack environment because you need to use the tool to perform the import operation.

    The following image shows a folder structure example. D:\downloadfolder contains all the downloaded marketplace items. Each subfolder is a marketplace item (for example, microsoft.custom-script-linux-arm-2.0.3), named by the product ID. Inside each subfolder is the marketplace item's downloaded content.

    Marketplace download directory structure

  2. Follow the instructions in this article to configure the Azure Stack Operator PowerShell session.

  3. Import the syndication module and then launch the marketplace syndication tool by running the following script:

    $credential = Get-Credential -Message "Enter the azure stack operator credential:"
    Import-AzSOfflineMarketplaceItem -origin "marketplace content folder" -AzsCredential $credential

    The -origin parameter specifies the top-level folder that contains all the downloaded products; for example, "D:\downloadfolder".

    The -AzsCredential parameter is optional. It's used to renew the access token, if it has expired. If the -AzsCredential parameter isn't specified and the token expires, you receive a prompt to enter the operator credentials.


    AD FS only supports interactive authentication with user identities. If a credential object is required, you must use a service principal (SPN). For more information about setting up a service principal with Azure Stack and AD FS as your identity management service, see Manage an AD FS service principal.

  4. After the script successfully completes, the item should be available in Azure Stack Marketplace.

Next steps