Find Your IP using PowerShell and WMI

I recently was writing a script which required me to find the IP of the local machine and use it later on. I stoped for a minute and realized that some computers will have one network card and some will have 20, including virtual adapters. So I knew there had to be a way to figure out which network cards were being assigned an address and see a list of them. I came up with the following:

(gwmi -query "SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled=TRUE").IPAddress

Then, to reference any single NIC, if there are more than one, you only need to specify the one you need out of the array with [0] or [1] etc etc.

Not PERFECTLY simple, but practical and functional!