microsoft / Partner-Center-PowerShell

PowerShell module for managing Partner Center resources.
https://docs.microsoft.com/powershell/partnercenter/
MIT License
131 stars 59 forks source link

Error while trying to get a list of products with Get-PartnerProduct #107

Closed KlausPeterRiemer closed 5 years ago

KlausPeterRiemer commented 5 years ago

Steps to reproduce

Execute Get-PartnerProduct with either CountryCode and Catalog or CountryCode, Catalog and Segment as parameter. Example: Get-PartnerProduct -CountryCode 'DE' -Catalog 'OnlineServices' Get-PartnerProduct -CountryCode 'DE' -Catalog 'OnlineServices' -Segment 'commercial'

Expected behavior

A list of products for the parameters specified. Additional Info: When using CountryCode and ProductId a single product item can be retrieved successfully.

Actual behavior

Result with CountryCode and Catalog

PS H:\> [Threading.Thread]::CurrentThread.CurrentUICulture = 'en-US'; Get-PartnerProduct -CountryCode 'DE' -Catalog 'OnlineServices'
Get-PartnerProduct : Value cannot be null.
Parameter name: value
At line:1 char:63
+ ...  = 'en-US'; Get-PartnerProduct -CountryCode 'DE' -Catalog 'OnlineServ ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo: NotSpecified: (:) [Get-PartnerProduct], ArgumentNullException
    + FullyQualifiedErrorId : System.ArgumentNullException,Microsoft.Store.PartnerCenter.PowerShell.Commands.GetPartnerProduct

Result with CountryCode, Catalog and Segment

PS H:\> [Threading.Thread]::CurrentThread.CurrentUICulture = 'en-US'; Get-PartnerProduct -CountryCode 'DE' -Catalog 'OnlineServices' -Segment 'commercial'
Get-PartnerProduct : The method or operation is not implemented.
At line:1 char:63
+ ...  = 'en-US'; Get-PartnerProduct -CountryCode 'DE' -Catalog 'OnlineServ ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo: NotSpecified: (:) [Get-PartnerProduct], NotImplementedException
    + FullyQualifiedErrorId : System.NotImplementedException,Microsoft.Store.PartnerCenter.PowerShell.Commands.GetPartnerProduct

Result with CountryCode and ProductId

PS H:\> [Threading.Thread]::CurrentThread.CurrentUICulture = 'en-US'; Get-PartnerProduct -CountryCode 'DE' -ProductId 'C5928F49-12BA-48F7-ADA3-0D743A3601D5'

ProductId                            Title               Type           Description
---------                            -----               ----           -----------
C5928F49-12BA-48F7-ADA3-0D743A3601D5 Visio Online Plan 2 OnlineServices

Environment

Module PartnerCenter Version 1.5.1903.5

Name Value


PSVersion 5.1.17134.590 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.17134.590 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1

ghost commented 5 years ago

Hi @KlausPeterRiemer,

Thank you for bringing this to our attention. The required code change have been made and are being tested right now. Our hope is to release a minor update today, to address this. Please let us know if you have any other issues.

ghost commented 5 years ago

Hi @KlausLoeffelmann,

Version 1.5.1903.6 has been released, which includes a fix for this issue. Please update and let us know if you have any other issues.

KlausPeterRiemer commented 5 years ago

Hi @isaiahwilliams,

thanks for the fast deployment of a fix, the Get-PartnerProducts cmdlet works as expected now. No other issues at the moment ...