I tried installing Active Directory modules through Optional features for running powershell and I get Install failed.