-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3b0f723
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@echo off | ||
title ipv4LKUP | ||
set /p url=Enter URL: | ||
|
||
for /f "delims=" %%a in ('powershell -command "(Resolve-DnsName -Name '%url%' -Type A).IPAddress"') do ( | ||
set ipv4=%%a | ||
goto :found_ipv4 | ||
) | ||
|
||
:found_ipv4 | ||
if defined ipv4 ( | ||
echo IPv4 Address: %ipv4% | ||
) else ( | ||
echo Unable to resolve URL to IPv4 address. | ||
) | ||
pause |