When you use NETDOM QUERY DC to return a list of domain controllers, it returns:

List of domain controllers with accounts in the domain:
DC1
DC2
...
DC<i>n</i>
The command completed successfully.
It is much easier to use the output of DSQUERY SERVER -O RDN in a script, as it returns:
DC1
DC2
...
DC<i>n</i>