Sometimes, classic tools like ipconfig.exe can yield useful information that you'd like to integrate with PowerShell. Here is sample code that illustrates how to grab all IPv4 addresses from ipconfig output:
PS > ipconfig | Where-Object { $_ -like '*IPv4*' } | ForEach-Object { ($_ -split ': ')[1] }