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.
ndr-itsolutionsAsked:
Who is Participating?
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.

BufferstopCommented:
Are the two NICs bridged? if so, right click on them and unbridge them
0
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'.

Thanks
0
Mohammed KhawajaManager - Infrastructure:  Information TechnologyCommented:
get-netipinterface -InterfaceAlias North | get-NetIPAddress | ft IPAddress
0
How do you know if your security is working?

Protecting your business doesn’t have to mean sifting through endless alerts and notifications. With WatchGuard Total Security Suite, you can feel confident that your business is secure, meaning you can get back to the things that have been sitting on your to-do list.

ndr-itsolutionsAuthor Commented:
Thanks

The output gives me the following:

IPAddress
---------------
10.10.0.1

I want to write the ip address to a text file, so I just want 10.10.0.1, any idea how I can parse this ?
0
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:

https://www.petri.com/manage-network-adapters-powershell-addressing-configuration-info
0
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.
0
Mohammed KhawajaManager - Infrastructure:  Information TechnologyCommented:
Get-NetIPInterface -AddressFamily IPv4 -InterfaceAlias North | Get-NetIPAddress | ft ipaddress -hidetableheaders| Out-File c:\junk\ipaddress1.txt
0

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.
0
ndr-itsolutionsAuthor Commented:
0
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
Powershell

From novice to tech pro — start learning today.