Windows Commands Cheat Sheet
Total Page:16
File Type:pdf, Size:1020Kb
WINDOWS COMMANDS CHEAT SHEET CONSTELLIX.COM NSLOOKUP - WINDOWS COMMANDS CHEAT SHEET Reverse DNS Lookup Ping Command DNS Lookup in PowerShell A ping measures the latency of a connection To specify what record, you must add “-type” If you have an IP address and need the for a target location. For demonstration to complete the cmdlet. domain name, you can do a reverse DNS lookup. purposes, I’ll run a ping test using 8.8.8.8, PS C:\Users\username>Resolve-DnsName C:\Users\username>nslookup 162.243.68.201 Google’s public DNS address. dnsmadeeasy.com -Type MX C:\Users\username>Ping 8.8.8.8 (or any record you choose). Set Command Example Nslookup Example Ping Command in PowerShell To find the nameserver for a domain or set a The nslookup command is helpful in Ping in PowerShell = Test-Connection specific parameter in your command line. diagnosing issues with DNS name resolution. C:\Users\username>nslookup PS C:\Users\username>Test-Connection An nslookup command would look like this: >set q=ns dnsmadeeasy.com >dnsmadeeasy.com C:\Users\username>nslookup dnsmadeeasy.com (press enter after each command) DNS Record Lookup Example Traceroute Command Traceroute in Powershell Use the nslookup and set command to verify domain name www.example.com and Tracert in PowerShell = tracert -thecmdlet shares or troubleshoot DNS records for your domain. its IP address. the same name as the CMD command. C:\Users\username>nslookup C:\Users\username>tracert 127.0.0.1 >set q=mx PS C:\Users\username>tracert example.com >dnsmadeeasy.com C:\Users\username>tracert www.example.com (press enter after each command) DNS Debug Command Nslookup - in PowerShell Command - Definitions To get additional details about your domain’s Nslookup in PowerShell = Resolve-DnsName Responsible mail addr - Represents the email of the domain administrator DNS, you can use the debug command. PS C:\Users\username>Resolve-DnsName C:\Users\username>nslookup Constellix.com or Serial - This is the serial number of the zone file >set debug C:\Users\username>Resolve-DnsName 162.243.68.201 Refresh - The time a secondary DNS server will take >example.com to request new information if a primary server’s serial number has changed Rety - If a primary server doesn’t respond to a request, it will reconnect within this timeframe Expire - Secondary DNS cache expiration time Default TTL - Refers to how long a record is cached before it’s refreshed.