vps-myip for Windows powershell
authorAJ ONeal <aj@therootcompany.com>
Tue, 30 Jun 2020 07:02:13 +0000 (07:02 +0000)
committerAJ ONeal <aj@therootcompany.com>
Tue, 30 Jun 2020 07:02:22 +0000 (07:02 +0000)
vps-myip/install.ps1 [new file with mode: 0644]

diff --git a/vps-myip/install.ps1 b/vps-myip/install.ps1
new file mode 100644 (file)
index 0000000..81fb0ce
--- /dev/null
@@ -0,0 +1,11 @@
+$ipv4 = curl.exe -sf https://api.ipify.org
+
+IF(!($ipv4 -eq $null -or $ipv4 -eq "")) {
+    echo "IPv4 (A)   : $ipv4"
+}
+
+$ipv6 = curl.exe -sf https://api6.ipify.org
+
+IF(!($ipv6 -eq $null -or $ipv6 -eq "")) {
+    echo "IPv6 (AAAA): $ipv6"
+}