I had a need to do a quick DNS lookup for computers in a powershell script which going through a list of computers. There are two ways to a system will not have a DNS entry: 1) System retired. 2) System uses DHCP and is not on the network.
A quick way to perform a look would be to use:
It does give output directed to the console. If you want to suppress it, use the [void] option.