Question: how to install active directory on local machine?
Answer: Right-click the Start button and choose “Settings” > “Apps” > “Manage optional features” > “Add feature“.
Select “RSAT: Active Directory Domain Services and Lightweight Directory Tools“.
Select “Install“, then wait while Windows installs the feature.