i try to install SQLEXPRADV_x64 "manual" with Install-ChocolateyPackage on an Azure Hosted Agent (Windows-Latest). I do manual as there is no Express Advanced Version available.
Error is: The term 'Install-ChocolateyPackage' is not recognized as the name of a cmdlet, function
And I can't find the fitting solution in the documentation. The CMDLET should be available on the Agent?
- powershell: |
$silentArgs = "/IACCEPTSQLSERVERLICENSETERMS /Q /ACTION=install /INSTANCEID=SQLEXPRESS /INSTANCENAME=SQLEXPRESS /UPDATEENABLED=FALSE"
$fileFullPath = "SQLEXPRADV_x64_ENU.exe"
$packageName = "MsSqlServer2016ExpressAdv"
$chocolateyTempDir = Join-Path (Get-Item $env:TEMP).FullName "chocolatey"
$tempDir = Join-Path $chocolateyTempDir $packageName
$extractPath = "$tempDir\SQLEXPRADV"
$setupPath = "$extractPath\setup.exe"
Write-Host "Extracting to " $extractPath
Start-Process "$fileFullPath" "/Q /x:`"$extractPath`"" -Wait
Install-ChocolateyPackage "$packageName" "EXE" "$silentArgs" "$setupPath" -validExitCodes @(0, 3010)
displayName: 'install sql express database'