导航:使用“;新的NAVServerUser“;容器环境中的Powershell命令
我想在容器中使用New NAVServerUser命令(请参阅:)来创建新的Nav用户。PowerShell以以下方式构建容器:导航:使用“;新的NAVServerUser“;容器环境中的Powershell命令,powershell,nav,navision,bc,dynamics-business-central,Powershell,Nav,Navision,Bc,Dynamics Business Central,我想在容器中使用New NAVServerUser命令(请参阅:)来创建新的Nav用户。PowerShell以以下方式构建容器: # Path to licence $licenceFile = 'C:\pathToLicence\Licence.flf' # Containername and NavImage $containername = "NewContainer" # Name des Containers $imagename = "mcr.micr
# Path to licence
$licenceFile = 'C:\pathToLicence\Licence.flf'
# Containername and NavImage
$containername = "NewContainer" # Name des Containers
$imagename = "mcr.microsoft.com/businesscentral/onprem:14.7.37609.0-de"
New-NavContainer -accept_eula -licenseFile $licenceFile -containerName $containername -imageName $imagename -doNotExportObjectsToText -includeCSide -TimeZoneId (Get-TimeZone).Id -shortcuts "Desktop" -alwaysPull -updateHosts -useBestContainerOS -accept_outdated
完成后,我尝试使用以下脚本创建新的NavUser:
[String]$ContiName = "NewContainer";
# Go into the Container to execute the script in it.
Invoke-ScriptInBCContainer -containerName $ContiName -scriptblock {
#Import Module to create Navuser
Import-Module "${env:ProgramFiles}\Microsoft Dynamics NAV\140\Service\NavAdminTool.ps1"
New-NavServerUser -WindowsAccount 'NEWCONTAINER\USER' -ServerInstance 'MicrosoftDynamicsNavServer$NAV'
}
可以想象,运行容器的计算机上的Windows帐户的用户名是“User”。因此,这将不起作用,并出现以下错误:
这是因为NEWCONTAINER/User已经存在。现在,我想在容器中创建一个新的Windows用户,以使用new-NAVServerUser命令。有人知道它是怎么工作的吗?
因此,总体目标是在“Users 9800”页的表“User 20000120”中获得一个新的NavUser,并且该用户应基于Windows帐户。
谢谢你的回答 我要查找的Powershell命令是“New navContainerWindowUser”或容器外部的“New LocalUser”