Install Google Chrome via DSC

Download the MSI from here.

Package GoogleChrome
{
    Ensure = "Present"
    Name = "Google Chrome"
    Path = 'C:\Software\GoogleChrome\googlechromestandaloneenterprise64.msi'
    ProductId = '83F2CE66-1F17-38DE-83BD-1BAD39009FB6'
    Arguments = '/qn /norestart'
}

Personally I dislike the shortcut that’s added to the desktop for all users.  Thankfully DSC can do something about this for me too…

File GoogleChrome-DesktopShortcut
{
    Ensure = 'Absent'
    DestinationPath = "$env:PUBLIC\Desktop\Google Chrome.lnk"
    DependsOn = "[Package]GoogleChrome"
}

A second dislike is the fact Chrome is pinned to all users taskbar. Once again DSC to the rescue…

Registry GoogleChrome-TaskbarPinning
{
    Ensure = 'Absent'
    Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{8A69D345-D564-463c-AFF1-A69D9E530F96}'
    ValueName = ''
    DependsOn = "[Package]GoogleChrome"
}
Install Google Chrome via DSC

Useful DSC Commands

Update-DSCConfiguration -Wait -Verbose

Perform an on-demand pull server check and use the Wait and Verbose parameters to see the result

Test-DscConfiguration -Verbose

Perform a test to see if the server is in its desired state. Use the Verbose output to see each test and which, if applicable, is causing the test show it is not in its desired state.  Optionally, using the Detailed parameter will give a simple table of which resources are and are not in a desired state.

Start-DSCConfiguration -UseExisting -Wait -Verbose

Request the Local Configuration Manager to reprocess the current local configuration.  Useful when a server is testing false when using Test-DSCConfiguration. The added Wait and Verbose parameters help see the configuration being applied as the server is configured.

Useful DSC Commands