Microsoft Dynamics NAV — How To Transfer Roles and Logins From One Active Directory To Another

 —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  — —















Sup­port trans­la­tion: http://amzn.to/1Z7d5oc
 — —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  — —
Microsoft Dynam­ics NAV — How To Trans­fer Roles and Logins From One Act­ive Dir­ect­ory To Another

How to migrate users from AD1 to AD2.

Step 1:

Get SID for users and cre­ate Excel sheet with the fol­low­ing struc­ture after remov­ing any users you do not require.
1;d.d;S-1 – 5-21 – 2382639853-3500016515 – 3173335468-1144 and save as a .CSV file.
C:\Users\crt>wmic user­ac­count get name, sid
Step 2: Save the CSV File:

Save the file as navusers.csv’.
Step 3: Save the file in the Temp Folder.

Save the file in:
C:\temp
Step 4: Open SQL Server Man­age­ment Stu­dio and Run the Fol­low­ing SQL Query:

Select the Data­base | New Query | and pas­te the fol­low­ing SQL.

Cre­ate Table sqlusert­mp (id int, name varchar(100),sid varchar(184))
GO

BULK INSERT sqlusert­mp
FROM c:\temp\navusers.csv’
WITH
(
FIELDTERMINATOR = ‘;’,
ROWTERMINATOR = ‘\n’
)
GO

Select * from sqlusert­mp
GO

DECLARE @RowCount INT
SET @RowCount = (SELECT COUNT(id) FROM sqlusert­mp)

DECLARE @I INT
DECLARE @USER INT

SET @I = 1
SET @USER0

WHILE (@I <= @RowCount)
BEGIN

DECLARE @name VARCHAR(100), @sid VARCHAR(184)

SELECT @name = name, @sid = sid FROM sqlusert­mp WHERE id = @I

IF(SELECT COUNT(*) from [Win­dows Login] WHERE [SID] = @sid) = 0
INSERT INTO [Win­dows Login] ([SID]) val­ues (@sid);

SET @USER = @USER1

SET @I = @I + 1
END
PRINT @USER
DROP TABLE sqlusert­mp

This will cre­ate the Win­dows Login’ for the users accord­ing to the CSV file cre­ated in the pre­vi­ous steps.
Step 5: Cre­ate Reports/Codeunits to export and import setup data.

Cre­ate the objects using C/AL code to import the required setup tables.

“ —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  — —

Appoġġ traduzz­joni: http://amzn.to/1Z7d5oc
 — —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  — —
Microsoft Dynam­ics NAV — Kif Biex Trasfer­i­ment Rwoli u logins Minn Wieħed Act­ive Dir­ect­ory To Ieħor

Kif jemig­raw utenti mil­li AD1 sa AD2.

Pass 1:

Get SID għall-utenti u joħolqu fol­ja Excel bl-istrut­tura li ġej­ja wara t-tneħħi­ja ta xi utenti inti ma jeħtiġux.
1, d.d; S-1 – 5-21 – 2382639853-3500016515 – 3173335468-1144 u ħlief bħala fajl CSV.
C: \ Utenti \ CRT> wmic user­ac­count jiks­bu l-isem, sid
Pass 2: Salv l-fajl CSV:

Salv l-fajl bħala ““navusers.csv””.
Pass 3: Salv l-fajl fil-folder Temp.

Salv l-fajl fi:
Ċ: \ tem­per­at­ura
Pass 4: Miftuħa SQL Server Ġest­joni Stu­dio u Mexxi dan li ġej SQL Mis­toqsi­ja:

Agħżel il-Data­base | Ġdid Mis­toqsi­ja | u pas­te tal-SQL li ġej­ja.

Oħloq sqlusert­mp Tabel­la (int id-isem varchar (100), varchar sid (184))
GO

sqlusert­mp DAĦĦAL BULK
“”: \ Tem­per­at­ura \ navusers.csv c”” MINN
MA
(
FIELDTERMINATOR = “”””,
ROWTERMINATOR = “”\ n””
)
GO

Agħżel * minn sqlusert­mp
GO

NIDDIKJARA @RowCount INT
SET @RowCount = (GĦADD SELECT (id) MINN sqlusert­mp)

NIDDIKJARA @I INT
NIDDIKJARA @USER INT

SET @I = 1
SET @USER0

WAQT (@I <= @RowCount)
BEGIN

JIDDIKJARAW varchar @name (100), @sid varchar (184)

@name TAGĦŻEL = isem, @sid = sid MILL sqlusert­mp FEJN id = @I

IF (GĦADD SELECT (*) minn [Win­dows Idħol] FEJN [SID] = @sid) = 0
DAĦĦAL FIS [Win­dows Login] ([SID]) Valuri (@sid);

@USER SET = @USER1

@I SET = @I + 1
END
@USER ISTAMPAR
DROP sqlusert­mp TABELLA

Dan se joħ­loq il- ““Win­dows Login”” għall-utenti skond il-fajl CSV maħluqa fil-passi ta qabel.
Pass 5: Oħloq Rap­porti / Codeunits għall-esportazz­joni u d-data setup importazz­joni.

Oħloq l-oġġet­ti bl-użu C kodiċi / AL li jim­portaw il-tabel­li setup meħtieġa.

“ —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  — —

Onder­steun­ing ver­tal­ing: http://amzn.to/1Z7d5oc
 — —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  — —
Microsoft Dynam­ics NAV — Hoe rolle en Logins van een Act­ive Dir­ect­ory Om Nog

Hoe om gebruikers migreer vanaf AD1 om AD2.

Stap 1:

Kry SID vir gebruikers en skep Excel vel met die vol­gende struk­tuur na n gebruikers jy nie nodig te ver­wyder.
1; d.d; S-1 – 5-21 – 2382639853-3500016515 – 3173335468-1144 en stoor as n CSV-lêer.
C: \ Users \ CRT> wmic user account kry naam, sid
Stap 2: Slaan die CSV:

Stoor die lêer as navusers.csv.
Stap 3: Slaan die lêer in die Temp Folder.

Slaan die lêer in:
C: \ temp
Stap 4: Open SQL Server Man­age­ment Stu­dio en voer die vol­gende SQL Query:

Kies die data­bas­is | Nuwe soek­tog | en plak die vol­gende SQL.

Skep Tabel sqlusert­mp (ID int, naam varchar (100), sid varchar (184))
GAAN

GROOT INSERT sqlusert­mp
UIT c: \ temp \ navusers.csv’
MET
(
FIELDTERMINATOR = ‘;’,
ROWTERMINATOR = ‘\ N’
)
GAAN

Kies * van sqlusert­mp
GAAN

VERKLAAR @RowCount INT
STEL @RowCount = (kies COUNT (OD) VAN sqlusert­mp)

VERKLAAR @I INT
VERKLAAR @USER INT

STEL @I = 1
STEL @USER0

TERWYL (@I <= @RowCount)
Begin

VERKLAAR @name Naam VARCHAR (100), @sid Naam VARCHAR (184)

SELECT @name = naam, @sid = SID UIT sqlusert­mp WAAR id = @I

INDIEN (kies COUNT (*) van [Win­dows Tek­en] Waar [SID] = @sid) = 0
Voeg in [Win­dows Tek­en] ([SID]) waardes (@sid);

STEL @USER = @USER1

STEL @I = @I + 1
EINDE
DRUK @USER
DROP TABLE sqlusert­mp

Dit sal die ““Win­dows aantek­en skep vir die gebruikers vol­gens die CSV geskep in die vori­ge stap­pe.
Stap 5: Maak Verslae / kode units is min­im­aal invo­er opstel data uit­vo­er en.

Skep die voor­wer­pe met C / AL-kode vir die vereiste opset tafels te voer.

“ —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  — —

përk­thim Sup­port: http://amzn.to/1Z7d5oc
 — —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  —  — —
Microsoft Dynam­ics NAV — Si për të trans­feru­ar Rolet dhe logins Nga Një Act­ive Dir­ect­ory To tjetër

Si për të migru­ar për­dor­ues­it AD1 të AD2.

Hapi 1:

Get SID për për­dor­ues­it dhe për të krijuar fletë Excel me struk­turën e mëposht­me pas heqjes ndon­jë për­dor­ues që nuk kërko­jnë.
1, d.d, S-1 – 5-21 – 2382639853-3500016515 – 3173335468-1144 dhe ruajtur si një ske­dar CSV.
C: \ Users \ KRRT> wmic user­ac­count mar­rë emrin, sid
Hapi 2: Save File CSV:

Ruaj file si ““navusers.csv””.
Hapi 3: Ruaj ske­dar­in në dos­je temp.

Ruani ske­dar­in në:
C: \ temp
Hapi 4: Open SQL Server Man­age­ment Stu­dio dhe Run në vijim SQL Query:

Zgjidh­ni Baza e të dhënave | New Query | dhe ngjis­ni SQL vijim.

Kri­jo Tabela sqlusert­mp (id int, emrin VARCHAR (100), sid VARCHAR (184))
GO

BULK INSERT sqlusert­mp
NGA ““c: \ temp \ navusers.csv ’
ME
(
FIELDTERMINATOR = ” ‘,
ROWTERMINATOR = ‘\ n’
)
GO

Zgjidh * nga sqlusert­mp
GO