# encoding: ascii
# api: powershell
# title: IP
# description: :LOL:
# version: 0.1
# author: greg zakharov
# license: CC0
# x-poshcode-id: 5063
# x-archived: 2014-04-13T13:00:17
# x-published: 2014-04-08T11:23:00
#
# while (poshcode.Exists()) {
# Write-PostAtPoshcode ‘Get Twitter RSS Feed’
# }
# Sounds like fantasy crisis those who endlessly duplicate post about Twitter RSS :D
#
<#
# Checking IP address with cmd:
# C:\> ipconfig
#
# Right? But what if you haven't enough rights to launch ipconfig?
# C:\> for /f "tokens=3" %i in ('reg query HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces /s ^| findstr DhcpIP') do @echo %i
#
# With PowerShell
#>
gp HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\* | % {if (($ip = $_.DhcpIPAddress) -ne '0.0.0.0') {$ip}}
