Closed Mkublbock closed 3 years ago
Somehow, it doesn't get your artifactUrl parameter - maybe it needs to be in " maybe you have a space after one of the ` at the end of a line.
When I type
New-BCContainer -accept_eula -accept_outdated -containerName BC17 -artifactUrl https://bcartifacts.azureedge.net/onprem/17.0.16993.0/at -licenseFile "C:\Users\kueblboeck\Documents\Lizenzen\201005_5356216_DEV_BC17.flf" -updateHosts -useSSL -memoryLimit 4G
directly into powershell it works, but when I execute this script
param (
[parameter(Mandatory=$true)]
[String]
$containerName,
[parameter(Mandatory=$true)]
[String]
$artifactUrl
)
New-BCContainer -accept_eula -accept_outdated -containerName $containerName -artifactUrl $imageName -licenseFile ".license.flf" -updateHosts -useSSL -memoryLimit 4G
it doesn't take artifactUrl into account - even with "" around $imageName it doesn't work. Will play with it a little bit to see if I can fix it.
Thanks for your help!
Your parameter is called $artifactUrl and you are using $imageName in the code ($imagename is probably blank)
Obviously, how have I overlooked that 🤦♂️
I am trying to create a new Container with BC Version 17.X but it always pulls the latest image from mcr.microsoft.com/businesscentral/onprem:ltsc2019. I am using the artifacturl https://bcartifacts.azureedge.net/onprem/17.0.16993.0/at which I got from running
Get-BCArtifactUrl -type OnPrem -country "at"
This is the script I am using:
Full output of the script:
As you can see I am using the correct ArtifactURL but it will still pull the image from mcr.microsoft.com/businesscentral/onprem:ltsc2019.