Answer the question
In order to leave comments, you need to log in
How does the $null overload work?
It's happening in PowerShell
I can understand why
([system.Net.Dns]::GetHostByName()) doesn't work.AddressList
No overload, ok.
But why does it work, also with the result (gives the local ip)
([system.Net.Dns]::GetHostByName($null)).AddressList
Answer the question
In order to leave comments, you need to log in
https://msdn.microsoft.com/en-us/library/system.ne... (v=vs.110).aspx
If you pass an empty string as the host name, this method retrieves the standard host name for the local computer.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question