DSCResources/VH_xThunderbird/VH_xThunderbird.schema.psm1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Powershell DSC Configuration Script for installing Mozilla Thunderbird. Based on xFirefox by the PowerShell Team
# Vasken Houdoverdov

Configuration VH_xThunderbird
 {
     param
     (
         [string]$VersionNumber = "38.1.0",
         [string]$Language = "en-US",
         [string]$OS = "win",
         [ValidateSet("x86","x64")] 
         [string]$MachineBits = "x86",
         [string]$LocalPath = "$env:SystemDrive\Windows\DtlDownloads\Thunderbird Setup " + $versionNumber +".exe"
     )

         Import-DscResource -ModuleName PSDesiredStateConfiguration
     Import-DscResource -ModuleName @{ModuleName="xPSDesiredStateConfiguration";ModuleVersion="3.5.0.0"}
    
     xRemoteFile Downloader
     {
          Uri = "http://download.mozilla.org/?product=thunderbird-" + $VersionNumber +"&os="+$OS+"&lang=" + $Language 
          DestinationPath = $LocalPath
     }
   
     Package Installer
     {
          Ensure = "Present"
          Path = $LocalPath
          Name = "Mozilla Thunderbird " + $VersionNumber + " (" + $MachineBits + " " + $Language +")"
          ProductId = ''
          Arguments = "/SilentMode"
          DependsOn = "[xRemoteFile]Downloader"
     }
}