Is there an easy way in powershell 3.0 Windows 7 to get the local computer\'s ipv4 address into a variable?
Here is another solution:
$env:HostIP = ( Get-NetIPConfiguration | Where-Object { $_.IPv4DefaultGateway -ne $null -and $_.NetAdapter.Status -ne "Disconnected" } ).IPv4Address.IPAddress