Retrieving IP Address

I have server's  with two NIC's installed, I need to retrieve just the bare ip address of the one labelled NORTH (Interface Alias).

I also need this code to work on PS 2.0 upwards.

Thanks in advance for any ideas or code to this.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Are the two NICs bridged? if so, right click on them and unbridge them
ndr-itsolutionsAuthor Commented:
No, they are not bridged. I'm looking for a piece of code to get the IP address of the NIC that is labelled 'NORTH'.

Mohammed KhawajaManager - Infrastructure:  Information TechnologyCommented:
get-netipinterface -InterfaceAlias North | get-NetIPAddress | ft IPAddress
Check Out How Miercom Evaluates Wi-Fi Security!

It's not just about Wi-Fi connectivity anymore. A wireless security breach can cost your business large amounts of time, trouble, and expense. Plus, hear first-hand from Miercom on how WatchGuard's Wi-Fi security stacks up against the competition plus a LIVE demo!

ndr-itsolutionsAuthor Commented:

The output gives me the following:


I want to write the ip address to a text file, so I just want, any idea how I can parse this ?
Mohammed KhawajaManager - Infrastructure:  Information TechnologyCommented:
Refer to the link below which shows you how you could run it remotely as well as log output to file:
ndr-itsolutionsAuthor Commented:
Thanks, but that does not solve my issue, I need the results parsed to show only the ip address and not the table.
Mohammed KhawajaManager - Infrastructure:  Information TechnologyCommented:
Get-NetIPInterface -AddressFamily IPv4 -InterfaceAlias North | Get-NetIPAddress | ft ipaddress -hidetableheaders| Out-File c:\junk\ipaddress1.txt

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ndr-itsolutionsAuthor Commented:
Unfortunately, the output has carriage returns and line feeds, need to try and remove these.
ndr-itsolutionsAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.