Powershell DSC Package Resource Arguments

This topic contains 2 replies, has 3 voices, and was last updated by Profile photo of Brian Brian 4 months, 3 weeks ago.

  • Author
    Posts
  • #64842
    Profile photo of Quintin Fulgham Jr
    Quintin Fulgham Jr
    Participant

    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
    ackageTest
    VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, "methodName' =
    SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' =
    root/Microsoft/Windows/DesiredStateConfiguration'.
    VERBOSE: An LCM method call arrived from computer COMPUTERNAME with user sid
    S-1-5-21-220523388-1454471165-1801674531-583354.
    VERBOSE: [COMPUTERNAME]: LCM: [ Start Set ]
    VERBOSE: [COMPUTERNAME]: LCM: [ Start Resource ] [[Package]GoogleChrome]
    VERBOSE: [COMPUTERNAME]: LCM: [ Start Test ] [[Package]GoogleChrome]
    VERBOSE: [COMPUTERNAME]: [[Package]GoogleChrome] The package Google Chrome is not
    installed
    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
    installed
    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
    Profile photo of Daniel Krebs
    Daniel Krebs
    Moderator

    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
    Profile photo of Brian
    Brian
    Participant

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

You must be logged in to reply to this topic.