Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Product ID Translation #26

Closed
aydeisen opened this issue Nov 21, 2017 · 7 comments
Closed

Product ID Translation #26

aydeisen opened this issue Nov 21, 2017 · 7 comments

Comments

@aydeisen
Copy link

What can I use in the API for /cvrf/ID to translate the returned Product ID to a product name? If the ability doesn't currently exist, can it be added?

@somoking
Copy link

somoking commented Nov 21, 2017

Hey Aydeisen, I was able to do this pretty simply.

The code below is in c# with newton Json. This means the object JArray is a json array and JObject is a json object.

 static Dictionary<string,string> ProductMapper (JArray ProductTree)
        {
            Dictionary<string, string> ProductIDDict = new Dictionary<string, string>();
            foreach (JObject Product in ProductTree)
            {
                ProductIDDict.Add((string)Product["ProductID"], (string)Product["Value"]);
            }
            return ProductIDDict;
        }

I do not think this ability currently exists or can be added to the project so you will probably have to do it on your own program.

@aydeisen
Copy link
Author

Thanks, I found what I was looking for. The Product ID translation was further up the schema for the CVRF link than I was originally looking

@ryvius
Copy link

ryvius commented Mar 22, 2018

Hi where is this product id translation?

@craig-martin
Copy link
Contributor

That mapping in CVRF is in the ProductTree node. You can access it like this:


# Get a CVRF document
$cvrf = Get-MsrcCvrfDocument -ID '2018-Jan'

# Get CVRF.ProductTree.FullProductName
$cvrf.ProductTree.FullProductName
<#
ProductID   Value                                                                                                                                 
---------   -----                                                                                                                                 
11463       .NET Core 1.0                                                                                                                         
11464       .NET Core 1.1                                                                                                                         
11465       .NET Core 2.0                                                                                                                         

11460       ASP.NET Core 2.0                                                                                                                      
11447       ChakraCore                                                                                                                            
10555-10378 Internet Explorer 10 on Windows Server 2012                                                                                           
10486-10729 Internet Explorer 11 on Windows 10 for 32-bit Systems                                                                                 
10486-10735 Internet Explorer 11 on Windows 10 for x64-based Systems                                                                                                                                             
10486-10047 Internet Explorer 11 on Windows 7 for 32-bit Systems Service Pack 1                                                                   
10486-10048 Internet Explorer 11 on Windows 7 for x64-based Systems Service Pack 1                                                                
10486-10481 Internet Explorer 11 on Windows 8.1 for 32-bit systems                                                                                
10486-10482 Internet Explorer 11 on Windows 8.1 for x64-based systems                                                                             
10486-10484 Internet Explorer 11 on Windows RT 8.1                                                                                                
10486-10051 Internet Explorer 11 on Windows Server 2008 R2 for x64-based Systems Service Pack 1                                                   
10486-10483 Internet Explorer 11 on Windows Server 2012 R2                                                                                        
10486-10816 Internet Explorer 11 on Windows Server 2016                                                                                           
10336-9312  Internet Explorer 9 on Windows Server 2008 for 32-bit Systems Service Pack 2                                                          
10336-9318  Internet Explorer 9 on Windows Server 2008 for x64-based Systems Service Pack 2                                                       
9292-9312   Microsoft .NET Framework 2.0 Service Pack 2 on Windows Server 2008 for 32-bit Systems Service Pack 2                                  
9292-9311   Microsoft .NET Framework 2.0 Service Pack 2 on Windows Server 2008 for Itanium-Based Systems Service Pack 2                           
9292-9318   Microsoft .NET Framework 2.0 Service Pack 2 on Windows Server 2008 for x64-based Systems Service Pack 2                               
9195-9312   Microsoft .NET Framework 3.0 Service Pack 2 on Windows Server 2008 for 32-bit Systems Service Pack 2                                  
9195-9311   Microsoft .NET Framework 3.0 Service Pack 2 on Windows Server 2008 for Itanium-Based Systems Service Pack 2                           
9195-9318   Microsoft .NET Framework 3.0 Service Pack 2 on Windows Server 2008 for x64-based Systems Service Pack 2                               
2472-10729  Microsoft .NET Framework 3.5 on Windows 10 for 32-bit Systems                                                                         
2472-10735  Microsoft .NET Framework 3.5 on Windows 10 for x64-based Systems                                                                      
2472-10789  Microsoft .NET Framework 3.5 on Windows 10 Version 1511 for 32-bit Systems                                                                      
#>

@ryvius
Copy link

ryvius commented Mar 23, 2018

@craig-martin thank u! is there any table for product family?

@craig-martin
Copy link
Contributor

The product family detail is in the ProductTree node of the CVRF document. CVRF is quite normalized but can be aggregated back into tables depending on what you're trying to do.

Get-MsrcCvrfAffectedSoftware.ps1 is an example of this.

@tma-prismo
Copy link

@craig-martin from the product id and the product name, how do we map to the information we get from the machine,
for example, for product "SQL Server Manage Studio", the api has:
{
"ProductID": "11784",
"Value": "SQL Server Management Studio 18.6"
},

"wmic get product name, version, identifyingnumber" return
{67FD1BCA-F06F-48F5-86E9-AC4EA982A775} SQL Server Management Studio 15.0.18338.0

the base product name matches, but the api seems to have product id and "external" version number, and the wmic has a build number, GUID, how do we map between these?

in this case the release note has the info, but is there a general method to do the mapping?
https://docs.microsoft.com/en-us/sql/ssms/release-notes-ssms?view=sql-server-ver15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants