BC-User anlegen

Per PowerShell-BC-Command

Import-Module „C:\Program Files\Microsoft Dynamics 365 Business Central\200\Service\Microsoft.Dynamics.Nav.Management.dll“

$userArray = @(„Domäne\Username“,“Domäne\Username“)

foreach ($user in $userArray) {

    New-NAVServerUser $serviceTier -WindowsAccount $user -Verbose

    New-NAVServerUserPermissionSet $serviceTier –WindowsAccount $user -PermissionSetId SUPER -Verbose

}

Per SQL-Command

DECLARE @USERSID uniqueidentifier, @WINDOWSSID nvarchar(119), @USERNAME nvarchar(50)

SET @USERNAME   = ‚Domäne\Username‘

SET @USERSID    =  NEWID();

SET @WINDOWSSID = ‚S-0-0-00-0000000000-000000000-0000000000-0000‘

 

INSERT INTO [dbo].[User]

           ([User Security ID],[User Name],[Full Name],[State],[Expiry Date],

                 [Windows Security ID],[Change Password],[License Type],[Authentication Email],[Contact Email],[Exchange Identifier],[Application ID])

    VALUES

          (@USERSID,@USERNAME,“,0,’1753-01-01 00:00:00.000′,@WINDOWSSID,0,0,“,“,“,’00000000-0000-0000-0000-000000000000′)

 

INSERT INTO [dbo].[User Property]

          ([User Security ID],[Password],[Name Identifier],[Authentication Key],[WebServices Key],[WebServices Key Expiry Date],[Authentication Object ID],[Directory Role ID])

    VALUES

          (@USERSID,“,“,“,“,’1753-01-01 00:00:00.000′,“,“)

 

INSERT INTO [dbo].[Access Control]

           ([User Security ID],[Role ID],[Company Name],[Scope],[App ID])

    VALUES

          (@USERSID,’SUPER‘,“,0,’00000000-0000-0000-0000-000000000000′)

GO