Hello,
A Domain-DNS object represents an Active Directory domain. For more information, have a look at the following article by Microsoft: https://msdn.microsoft.com/en-us/librar ... 85%29.aspx.
As to why we chose this object type for the Task, the object type doesn't really matter for this particular Task. The thing is that everything that the script needs is already included in the script: the group DNs and the OU DNs are hard-coded in the hash table. So, the choice of the target object for this particular task is more a matter of convenience.
An advantage of using the Domain-DNS object type for the task is that the task will be run only once each time it is triggered. If you create a Scheduled Task for e.g. the Group object type and assign it over your domain, it will be run as many times as many groups you have in your AD domain. Assigning the Task over a specific object inside your domain (e.g. a user or group) can also cause issues, because the user/group can be deleted or moved somewhere, whereas a domain is more or less stable.