Powershell DSC Package Resource Arguments

Welcome Forums DSC (Desired State Configuration) Powershell DSC Package Resource Arguments

This topic contains 2 replies, has 3 voices, and was last updated by

1 year, 11 months ago.

  • Author
  • #64842

    Points: 0
    Rank: Member

    Back Again Yall!

    Sooooo now I have a question concerning installing msi or exe programs. I plan on creating a dsc function to automate installation of some software. I am testing the package resource with the Google Chrome Enterprise MSI software package. First, I tested an unattended installation via the powershell console with these commands:

    msiexec.exe /i "C:\Users\username\Desktop\googlechromestandaloneenterprise64.msi" /q /norestart

    And it successfully quietly downloaded chrome to my server with no issue. So I then proceeded to transfer that to the dsc package resource with these values:

    Configuration GoogleChromePackageTest
        Node 'localhost'
            Package GoogleChrome
                Ensure      = "Present"  
                Path        = "C:\Users\username\Desktop\googlechromestandaloneenterprise64.msi"
                Arguments   = "/i /q /norestart"
                Name        = "Google Chrome"
                ProductId   = "BE40B3E0-129E-313C-B663-94C192C5143F"

    But when I went through the process of creating the .mof file and then starting the dsc config it stalls at this following step:

    PS C:\Users\username\Desktop> Start-DSCConfiguration -Wait -verbose -Force -Path C:\Users\username\Desktop\GoogleChromeP
    VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, "methodName' =
    SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' =
    VERBOSE: An LCM method call arrived from computer COMPUTERNAME with user sid
    VERBOSE: [COMPUTERNAME]: LCM: [ Start Resource ] [[Package]GoogleChrome]
    VERBOSE: [COMPUTERNAME]: LCM: [ Start Test ] [[Package]GoogleChrome]
    VERBOSE: [COMPUTERNAME]: [[Package]GoogleChrome] The package Google Chrome is not
    VERBOSE: [COMPUTERNAME]: LCM: [ End Test ] [[Package]GoogleChrome] in 0.2810 seconds.
    VERBOSE: [COMPUTERNAME]: LCM: [ Start Set ] [[Package]GoogleChrome]
    VERBOSE: [COMPUTERNAME]: [[Package]GoogleChrome] The package Google Chrome is not
    VERBOSE: [COMPUTERNAME]: [[Package]GoogleChrome] Package configuration starting

    And it just stalls at that last line. I've checked at previous forums who ran into this issue, and found that the issue is possibly that the installation is awaiting for a GUI response. But in my dsc package function I have the appropriate arguments to quietly install chrome (as shown in the previous msiexe command that was successful). Is the way I am writing the arguments invalid?

  • #64884

    Points: 24
    Team Member
    Rank: Member

    What happens if you remove the /i from the arguments? You don't need the /i because the Package resource is already adding it to the command line.

  • #65794

    Points: 3
    Rank: Member

    Try doing it with no arguments. I've noticed that the package resource defaults /q and /norestart.

The topic ‘Powershell DSC Package Resource Arguments’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort