It seems that the script relies on a system tool — Netdom — which is not available on your Operating System. According to documentation, this tool seems to be included into certain Operating Systems only. If you have Windows 10, check these resources: https://www.bing.com/search?q=netdom+windows+10.
To find a replacement, you can ask a question, describing the problem.