Product key not being applied during installation of VS 2022 Professional or Enterprise Can any one Help for the same

Kayitha Hanmanthu 1 Reputation point
2022-09-13T06:14:24.11+00:00

I am using Powershell app deploy toolkit. by giving below commands i am able install the VS 2022 But Product key not being applied during installation of VS 2022 Professional.

$RetVal = Execute-Process -Path "$dirFiles\vs_Professional.exe" -Parameters "--add Microsoft.VisualStudio.Workload.CoreEditor --add Microsoft.VisualStudio.Workload.Python --add Microsoft.VisualStudio.Workload.VisualStudioExtension --add Microsoft.VisualStudio.Workload.Azure --add Microsoft.VisualStudio.Workload.Data --add Microsoft.VisualStudio.Workload.DataScience --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NativeCrossPlat --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.NetCoreTools --add Microsoft.VisualStudio.Workload.NetWeb --add Microsoft.VisualStudio.Workload.Node --add Microsoft.VisualStudio.Workload.Office --locale en-US --quiet --wait --norestart --productKey XXXX-XXXX-XXX-XXXX" -PassThru

    Write-Log "Visual Studio Second command installed successfully"  

    $RetVal = Execute-Process -Path "$dirFiles\vs_Professional.exe" -Parameters "--productKey XXXX-XXXX-XXX-XXXX" -PassThru
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,040 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 30,561 Reputation points Microsoft Vendor
    2022-09-13T08:40:15.693+00:00

    Hi @Kayitha Hanmanthu ,

    Welcome to Microsoft Q&A forum.

    Does VS prompt any error message? According to this document: Use command-line parameters to install Visual Studio:

    --productKey

    During an install command, this parameter defines the product key to use for an installed product. It’s composed of 25 alphanumeric characters in the format xxxxxxxxxxxxxxxxxxxxxxxxx.

    So, did you use 25 alphanumeric characters to sign in VS? And use the correct format that the description shows?

    Best Regards,
    Tianyu

    • If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.