THe_Revolver
asked on
Create SNTP Report for AD Domain?
Does any one know of a tool that could pull the NTP information from every windows server in a domain? I want to make sure that all of the 100+ servers I'm in charge of are all pointing to the same place.
Thanks!
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'm not all that familiar with PowerShell but I will tinker around a bit. I also do not have a list of servers. I could make one pretty quickly though. What would the list look like?
the list for my bat looks like fallowing format File name servers.txt
Server1
server2
Server3
Server1
server2
Server3
One server name per line. If all the servers are in the same domain, and DNS is working as expected, just the hostname should do.
SERVER01
SERVER02
SERVER03
If needs be, you can use the FQDN...
SERVER01.mydomain.local
SERVER02.mydomain.local
...
SERVER01
SERVER02
SERVER03
If needs be, you can use the FQDN...
SERVER01.mydomain.local
SERVER02.mydomain.local
...
ASKER
Makes sense. I will give it a go and report back. Thanks guys!
ASKER
This was a perfect explanation and worked flawlessly. For having almost no scripting experience and zero powershell experience, I was able to use this solution quite easily.
Thanks!
Thanks!
Open in new window
create a new text file past fallowing code save as "run.bat"create a new text file servers.txt and provide list of server in it
open cmd and run run.bat
it will create a file called output.csv you able to open this file in excel for batter view
code Example
--------------------------
D:\>for /f "tokens=*" %x in ('reg query HKLM\SYSTEM\CurrentControl
32Time\Parameters /v NtpServer ^|find /i "REG_SZ"') do echo %hostname%;%x
D:\>echo localhost;NtpServer REG_SZ time.windows.com,0x1
MYPC01;NtpServer REG_SZ time.windows.com,0x1
D:\>