Getting ready

Before you can run this recipe, you need to create a group in the AD. In this recipe, you use a group, Sales Group, contained in the Sales OU. To create the OU, the domain local group, do the following:

    # Creating the OU and Group
    $SB = { New-ADOrganizationalUnit -Name 'Sales'
                                     -Path 'DC=Reskit,DC=Org'
            New-ADGroup -Name 'Sales Group'
                        -Path 'OU=Sales,DC=Reskit,DC=Org'
                        -GroupScope DomainLocal
    }
    Invoke-Command -ComputerName DC1 -ScriptBlock $SB