Created
October 9, 2014 00:38
-
-
Save markus101/1796fa1459246315f163 to your computer and use it in GitHub Desktop.
SQL2008 PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$package = 'SQL2008.Powershell' | |
try { | |
$params = @{ | |
packageName = $package; | |
fileType = 'msi'; | |
silentArgs = '/quiet'; | |
url = 'http://download.microsoft.com/download/0/E/6/0E67502A-22B4-4C47-92D3-0D223F117190/PowerShellTools.msi'; | |
url64bit = 'http://download.microsoft.com/download/A/D/0/AD021EF1-9CBC-4D11-AB51-6A65019D4706/PowerShellTools.msi'; | |
} | |
Install-ChocolateyPackage @params | |
# install both x86 and x64 editions since x64 PS supports both | |
$IsSytem32Bit = (($Env:PROCESSOR_ARCHITECTURE -eq 'x86') -and ` | |
($Env:PROCESSOR_ARCHITEW6432 -eq $null)) | |
if (!$IsSytem32Bit) | |
{ | |
$params.url64bit = $params.url | |
Install-ChocolateyPackage @params | |
} | |
Write-ChocolateySuccess $package | |
} catch { | |
Write-ChocolateyFailure $package "$($_.Exception.Message)" | |
throw | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment