“What AD site is this IP address in?” If you are in a small single forest single Active Directory domain, the answer is easy. If you have multiple forests or many domains, you may find yourself running to a spreadsheet to get the answer.
My teammate Ryan suggested using NLTest: nltest /dsaddresstosite:192.168.1.10, which gives you the site name and the AD subnet. I wanted that information plus the associated domain controller names (yes, we have many). My first draft of the script captures the output from nltest, but I wrote it using cmdlets from the ActiveDirectory module. I thought it would be more useful to avoid that as a dependency, and so I re-wrote Find-ADsiteFromIP.ps1 to use the built-in ADSearcher, instead.