Windows Server 2019 Automation with PowerShell Cookbook
上QQ阅读APP看书,第一时间看更新

Introduction

A core component of almost all organizations' IT infrastructure is Active Directory (AD). Active Directory provides access control, user and system customization, and a wealth of directory and other services.

Using AD Domain Services, you can deploy a series of domain controllers throughout your organization. Use the Installing Active Directory and DNS recipe to install a pair of domain controllers that also provides a DNS service for your newly created AD forest. In the Creating and managing AD users recipe, you create, move, and remove user objects, as well as creating OUs and groups and establishing membership of these AD objects. In the Adding users to AD via a CSV recipe, you use a comma-separated value file containing details of users you wish to add to the AD.

The group policy is another important feature of Active Directory. With the group policy, you can define policies for users and computers that are applied automatically to the user and/or computer. In the Creating a group policy object recipe, you create a simple GPO and observe applying that policy.

In the penultimate recipe, Reporting on AD users, you examine the AD to find details on users who haven't logged on for a while, computers that have not been used for a while, and users who are members of special security groups (such as enterprise administrators). The final recipe, Finding expired computers and disabled users, finds computer and user objects that have not been used in a while. This can help you to keep your AD free of stale objects.