DSCResources/MSFT_xChrome/MSFT_xChrome.schema.psm1

Configuration MSFT_xChrome
{
    param
    (
        [string]$Language = "en",
        [string]$LocalPath = "$env:SystemDrive\Windows\DtlDownloads\Chrome"
    )
    $localSetupPath = $LocalPath + "\GoogleChromeStandaloneEnterprise.msi"
    
    Import-DscResource -ModuleName xPSDesiredStateConfiguration1

    File CreateLocalPath
    {
        Type = 'Directory'
        DestinationPath = $LocalPath
        Ensure = "Present"
    }
    
    xRemoteFile DownloadSetup
    {
        Uri = "https://dl.google.com/tag/s/appguid={8A69D345-D564-463C-AFF1-A69D9E530F96}&iid={00000000-0000-0000-0000-000000000000}&lang="+$Language+"&browser=3&usagestats=0&appname=Google%2520Chrome&needsadmin=prefers/edgedl/chrome/install/GoogleChromeStandaloneEnterprise.msi" 
        DestinationPath = $localSetupPath
        DependsOn = "[File]CreateLocalPath"
    }
 
    Package InstallChrome
    {
        Ensure = "Present"
        Path = $localSetupPath
        Name = "Google Chrome"
        ProductId = ''
        DependsOn = "[xRemoteFile]DownloadSetup"
    }
}