Scripts/Install-BcSystem.ps1
# Specify the name of the Business Central Server Instance to use for the installation. $ServerInstance = '' # E.g. 'BC170' or @('NST160Test', 'NST160Acc') # Import PowerShell module Install-Module FpsGeneral -Force Import-Module FpsGeneral -Force Install-Module FpsBcDeployment -Force Import-Module FpsBcDeployment -Force $licenseSupportedExtension = @('*.flf', '*.bclicense') $licensePath = Join-Path $PSScriptRoot 'CustomerLicense.*' $licenseFile = Get-ChildItem $licensePath -Include $licenseSupportedExtension | Select-Object -First 1 Publish-BcSystem ` -ServerInstance $ServerInstance ` -SoftwarePath (Join-Path $PSScriptRoot 'System') ` -LicensePath $licenseFile.FullName ` -RemovePreviousVersions ` -ErrorAction Stop |