Author Posts

September 27, 2017 at 12:43 pm


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

September 27, 2017 at 1:41 pm

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"

September 28, 2017 at 8:50 am

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

Sumit Verma

September 28, 2017 at 4:23 pm


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.


September 30, 2017 at 10:43 am

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.