forked from rstefanetti/Powershell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCreateBCSandbox.ps1
More file actions
31 lines (26 loc) · 1.23 KB
/
Copy pathCreateBCSandbox.ps1
File metadata and controls
31 lines (26 loc) · 1.23 KB
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
install-module navcontainerhelper -force
# set accept_eula to $true to accept the eula found here: https://go.microsoft.com/fwlink/?linkid=861843
$accept_eula = $True
$containername = 'BC150-SANDBOX'
$navdockerimage = 'mcr.microsoft.com/businesscentral/sandbox:it'
$appbacpacuri = ''
$tenantbacpacuri = ''
$additionalParameters = @()
if ($appbacpacuri -ne '' -and $tenantbacpacuri -ne '') {
$additionalParameters = @("--env appbacpac=""$appbacpacuri""","--env tenantBacpac=""$tenantbacpacuri""")
}
$credential = get-credential -UserName $env:USERNAME -Message "Using Windows Authentication. Please enter your Windows credentials."
New-NavContainer -accept_eula:$accept_eula `
-containername $containername `
-auth Windows `
-Credential $credential `
-includeCSide `
-alwaysPull `
-doNotExportObjectsToText `
-usessl:$false `
-updateHosts `
-assignPremiumPlan `
-shortcuts Desktop `
-imageName $navdockerimage `
-additionalParameters $additionalParameters
Setup-NavContainerTestUsers -containerName $containername -password $credential.Password