I’ve put the working alternative command to retrieve the DNS in the initial code above.