MSI Installation parameters for DSC Package Resource

This topic contains 4 replies, has 3 voices, and was last updated by  Julien Nury 7 months, 3 weeks ago.

  • Author
  • #80693

    Sumit Verma


    I have to install a .msi package through Azure ARM template.There are several parameter inputs that need to be provided during installation. How do we achieve this using Package resource of DSC? How to provide these inputs?

    Please provide the answer.

    Sumit Verma

  • #80696

    Will Anderson

    You can provide those with the arguments parameter. Like so:

    $OMSArgs = '/C:"setup.exe /qn ADD_OPINSIGHTS_WORKSPACE=1 '+ "OPINSIGHTS_WORKSPACE_ID=$OMSWorkspaceID " + "OPINSIGHTS_WORKSPACE_KEY=$OMSWorkspaceKey " +'AcceptEndUserLicenseAgreement=1"'

    xPackage OMSInstall {
    Ensure = "Present"
    Path = $OMSPackageLocalPath
    Name = "Microsoft Monitoring Agent"
    ProductId = ""
    Arguments = $OMSArgs
    DependsOn = "[xRemoteFile]OMSPackage"

    • #80821

      Sumit Verma

      Thanks for providing the steps. I will implement it and if I face any issue then I will let you know.

      Sumit Verma

    • #80873

      Sumit Verma


      How do we know the arguments name of a given .msi file e.g. in the example that you provided, you used ADD_OPINSIGHTS_WORKSPACE, OPINSIGHTS_WORKSPACE_ID etc. How do we get these names from a .msi file. Is there any powershell command for this.


  • #81001

    Julien Nury

    Sometime, the package you try to install exists in Chocolatey (you can browse packages here:
    If you find your package, you can have a look at setup script in th package page (Files section). You may find somthing like:

    $install_options = '/s '
        if ($params.static -ne $false) {
            $install_options += 'STATIC=1 '
        if ($params.installdir -ne $null) {
            $install_options += 'INSTALLDIR=' + $params.installdir + ' '
        $install_options += 'ADDLOCAL="ToolsFeature'
        if ($params.source -ne $false) {
            $install_options += ',SourceFeature'

    That's some of identified parameters...
    BTW, the package provider may have a support/documentation page that lists these parameters.

You must be logged in to reply to this topic.