Good Contents Are Everywhere, But Here, We Deliver The Best of The Best.Please Hold on!
Data is Loading...
Your address will show here +12 34 56 78
Network, PowerShell, Server, Windows
In this case we’re going to use the method GetHostAddresses of the Dns class of the Sytem.Net namespace.
For PowerShell 2.0 you can use following Windows PowerShell One Liners:

Name to IP Address (DNS Forward)

IP Address to Name (DNS Reverse)

As of PowerShell 3.0 you can use the method GetHostEntry() for both Forward and Reverse: As of PowerShell 4.0 you can use the Cmdlet Resolve-DnsName as well as for both Forward and Reverse:
0

Network, PowerShell, Server, Windows
If you’re running a webserver it may be you have to run different services on the same port and need to use multiple IP addresses on the same network interface. This can happen for SMTP or Exchange Servers using several connectors.

In Server 2008 (don’t ask me why Micrososft did that) and as well as in Server 2012 the source IP address on a network interface will always be the lowest IP address, in this case, the latest you’ve added.

So what do you have to do now is to set a flag on the particular IP address to say: ” Hey you, please don’t be the primary source address!” and this happens with the help of netsh.exe command.

You can view the status of all of your IP address and their status with following command:

The IP address which should not act as a primary source address needs to be flagged with SkipAsSource=true. As this command is only working while adding a new address but you want to have this flag enabled at one of your IP addresses, you first have to remove it and then add it again with this command:

First, with the help of the SkipAsSource flag it instructs Windows not to use this IP as primary source IP and secondly, it prevents its registration in DNS (if dynamic registration is enabled).
0

Network, PowerShell, Server, Windows
Respective Microsoft’s Technet article regarding Resolve-DnsName I have created you a function with the ability to run it against more than only one computer. Resolve-DnsNames performs a DNS name query resolution for the specified name.

 

0