Verakso
Verakso

Reputation: 466

Get DNS Suffix Search list on remote servers

I have a bunch of server that I need to check among other things, if the DNS Suffix list is set up correctly.

I was planning on using PowerShell and the Get-DnsClientGlobalSetting, but I can only get to work on my local machine.

So, is there a way, I can get this information from a list of remote servers?

Upvotes: 1

Views: 3349

Answers (1)

Ansgar Wiechers
Ansgar Wiechers

Reputation: 200273

When in doubt, read the documentation (emphasis mine):

Get-DnsClientGlobalSetting
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [<CommonParameters>]

[...]
-CimSession
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

The parameter -CimSession takes a list of hostnames (or existing CIM sessions), so invoke it like this:

Get-DnsClientGlobalSetting -CimSession 'host1', 'host2', ...

Upvotes: 2

Related Questions