Monday, November 23, 2020

Force sync local AD with Microsoft 365

1. Run PowerShell


2. Run the following command to install the AzureAD Sync module:

 

[Import-Module ADSync]


3. Next lets review the current intervals AzureAD Connect uses to sync by running the following command.

 

[Get-ADSyncScheduler]


4. Now run the following command to initialize the AzureAD Sync immediately.

 

[Start-ADSyncSyncCycle -PolicyType Delta]


NOTE: This will only sync current changes.  Run the following command to force a complete sync but note that the length of sync time would be greatly increased.

 

Start-ADSyncSyncCycle -PolicyType Initial


Friday, September 18, 2020

Transfer FSMO roles using the NTDSUtil tool

 

Transfer FSMO roles using the NTDSUtil tool

Make sure domain administrator is member of Schema Admins group.

Login as administrator 

First, open the command prompt with administrative privileges.

Type ntdsutil and press Enter.
Type roles and press Enter.
Type connections and press Enter.
Type connect to server DC01 and press Enter, where DC01 is the server computer name that will transfer the FSMO roles to.
Type quit and press Enter.

Next, we will transfer FSMO roles one by one with the corresponding command, as the case may be. After each Enter appears a confirmation window. Just click Yes to continue.

For Schema Master, type transfer schema master and press Enter.
For RID Master, type transfer rid master and press Enter.
For Domain Naming Master, type transfer naming master and press Enter.
For PDC Emulator, type transfer pdc and press Enter.
For Infrastructure Master, type transfer infrastructure master and press Enter.

Transfer FSMO roles to another Domain Controller

After transferring the roles you want, press quit to exit the NTDSUtil environment.

Check status in command line 

netdom query fsmo


Wednesday, March 4, 2020

Windows Server convert Evaluation to Licensed version


Windows  Server convert Evaluation to Licensed version

Windows  Server is available as 180-day trial for testing purposes and when the evaluation period expires, the machine stops working properly.
Since the trial is an Evaluation edition, the installed version cannot be licensed as a paid edition but needs to be converted first.
When you try to enter the product key, the following message is displayed:

Verify current version
To display the current installed version, open an elevated Command Prompt and type the command:
C:\>DISM /online /Get-CurrentEdition
In this example, a Server Standard Evaluation edition is installed in the system. To check the Windows version, you can also use the command winver:
C:\>winver

Convert Evaluation to Licensed version
To activate Windows Server with your product key, you need to convert the Evaluation version to Licensed. To check available versions type the following command from an elevated Command Prompt:
C:\>DISM /online /Get-TargetEditions
§  ServerStandard
§  ServerDatacenter
To convert the version, type the command:
DISM /online /Set-Edition:<edition ID> /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula
C:\>DISM /online /Set-Edition:ServerStandard /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula
To complete the operation, type Y to restart the computer.
When the server has rebooted, check the installed version with the command:
C:\>DISM /online /Get-CurrentEdition
The Server edition is now a licensed version. Also using the winver command, the window displays the correct licensed version.
Windows has been activated successfully.
This procedure will only work if a KMS host is running on your network with KMS configured correctly.