Quickstart: Manage a private Azure Marketplace using PowerShell
This article describes how you can manage offers in a private Azure Marketplace using the Az.Marketplace PowerShell module.
Requirements
If you don't have an Azure subscription, create a free account before you begin.
If you choose to use Azure PowerShell locally:
- Install the Az PowerShell module.
- Connect to your Azure account using the Connect-AzAccount cmdlet.
If you choose to use Azure Cloud Shell:
- See Overview of Azure Cloud Shell for more information.
Important
While the Az.Marketplace PowerShell module is in preview, you must install it separately using the
Install-Module
cmdlet. After this PowerShell module becomes generally available, it will be part of future Az PowerShell module releases and available by default from within Azure Cloud Shell.Install-Module -Name Az.Marketplace
If you have multiple Azure subscriptions, choose the appropriate subscription in which the resources should be billed. Select a specific subscription using the Set-AzContext cmdlet.
Set-AzContext -SubscriptionId 00000000-0000-0000-0000-000000000000
List private stores
To retrieve a list of private stores, you use the Get-AzMarketplacePrivateStore cmdlet. The following example lists private stores that were created under the tenant scope.
Get-AzMarketplacePrivateStore
Availability : enabled
PrivateStoreId : 00000000-0000-0000-0000-000000000000
ETag : "00000000-0000-0000-0000-000000000000"
Id : /providers/Microsoft.Marketplace/privateStores/00000000-0000-0000-0000-000000000000
Name : 00000000-0000-0000-0000-000000000000
Type : Microsoft.Marketplace/privateStores
Add an offer to a private marketplace
To add an offer to a private store, you use the Set-AzMarketplacePrivateStoreOffer cmdlet. The following example adds the specified offer to a private marketplace for a private store that is created under the tenant scope.
$Params = @{
privateStoreId = '00000000-0000-0000-0000-000000000000'
offerId = 'publisherid.offerid'
SpecificPlanIdsLimitation =@('PublisherEnterpriseLinux72',
'PublisherEnterpriseLinux72-ARM',
'PublisherEnterpriseLinux73',
'PublisherEnterpriseLinux73-ARM',
'PublisherEnterpriseLinux73-ARM-pr'
)
}
Set-AzMarketplacePrivateStoreOffer @Params
UniqueOfferId : publisherid.offerid
OfferDisplayName :
PublisherDisplayName :
ETag : "00000000-0000-0000-0000-000000000000"
PrivateStoreId : 00000000-0000-0000-0000-000000000000
CreatedBy :
CreatedDate : 01/01/0001 00:00:00
SpecificPlanIdsLimitation : {PublisherEnterpriseLinux72, PublisherEnterpriseLinux72-ARM,
PublisherEnterpriseLinux73, PublisherEnterpriseLinux73-ARM, PublisherEnterpriseLinux73-ARM-pr}
Id :
/providers/Microsoft.Marketplace/privateStores/00000000-0000-0000-0000-000000000000/offers/
publisherid.offerid
Name : publisherid.offerid
Type : Microsoft.Marketplace/privateStores/offers
Get private store offers
To get one or more private store offers, you use the Get-AzMarketplacePrivateStoreOffer cmdlet. The following example gets offers that are associated with the specified private store that were added under the tenant scope.
Get-AzMarketplacePrivateStoreOffer -PrivateStoreId 00000000-0000-0000-0000-000000000000
UniqueOfferId : publisherid.offerid
OfferDisplayName :
PublisherDisplayName :
ETag : "00000000-0000-0000-0000-000000000000"
PrivateStoreId : 00000000-0000-0000-0000-000000000000
CreatedBy :
CreatedDate : 01/01/0001 00:00:00
SpecificPlanIdsLimitation : {small, medium-with-upgraded-bandwidth, medium-with-upgraded-apps, large, large-pr,
small-pr}
Id :
/providers/Microsoft.Marketplace/privateStores/00000000-0000-0000-0000-000000000000/offers/
publisherid.offerid
Name : publisherid.offerid
Type : Microsoft.Marketplace/privateStores/offers
UniqueOfferId : publisherid1.offerid1
OfferDisplayName :
PublisherDisplayName :
ETag : "00000000-0000-0000-0000-000000000000"
PrivateStoreId : 00000000-0000-0000-0000-000000000000
CreatedBy :
CreatedDate : 01/01/0001 00:00:00
SpecificPlanIdsLimitation : {azure_managedservices_professional ,azure_managedservices_professional-pr}
Id :
/providers/Microsoft.Marketplace/privateStores/00000000-0000-0000-0000-000000000000/offers/
publisherid1.offerid1
Name : publisherid1.offerid1
Type : Microsoft.Marketplace/privateStores/offers
Remove an offer
To remove an offer from a private store, you use the Remove-AzMarketplacePrivateStoreOffer cmdlet. The following example removes an offer from a private store that was created in the tenant scope.
Remove-AzMarketplacePrivateStoreOffer -privateStoreId 00000000-0000-0000-0000-000000000000 -offerId publisherid.offerid