Posts

Showing posts with the label Windows batch file

IT Notes : Use nslookup to monitor the ip address of a web site

nslookup is a windows command line tool to get the ip address of a web site . Below is the syntax for looking up the ip address of  www.abovethcloud.com C:\Users\User>nslookup -type=A www.abovethcloud.com Server:  dns.google Address:  8.8.8.8 Non-authoritative answer: Name:    www.abovethcloud.com Address:  155.248.183.49 If we need to monitor the address of www.abovethcloud.com frequently,  we can use a   Windows batch file to accomplish the task. After finishing the batch file, the ip address is stored to log file with file name YYYYHHMMSS.log. First check the date output format C:\Users\User>date The current date is: 13/01/2023 Fri Enter the new date: (dd-mm-yy) and time output format : C:\Users\User>time The current time is: 20:15:55.19 Enter the new time: The date string format is "DD/MM/YYYY Fri" DD is at position 0 to 1 MM is at position 3 to 4 YYYY is at position 6 to 9 Similarly, the time output format is HH:MM:SS....