- <#
- .SYNOPSIS
- This script gets and displays basic DNS Information about a host.
- .DESCRIPTION
- This script just gets and displays host details returnd by GetHostByName.
- .NOTES
- File Name : Get-ByName.ps1
- Author : Thomas Lee - tfl@psp.co.uk
- Requires : PowerShell Version 2.0
- .LINK
- This script posted to:
- http://www.pshscripts.blogspot.com
- MSDN sample posted tot:
- http://msdn.microsoft.com/en-us/library/system.net.dns.aspx
- .EXAMPLE
- PSH [C:\foo]: .\Get-HostByName.ps1
- HostName : contoso.com
- Aliases : {www.contoso.com}
- AddressList : {207.46.197.32, 207.46.232.182}
- #>
- $hostInfo = [system.net.Dns]::GetHostByName("www.contoso.com");
- $hostinfo | fl * -force
This blog contains PowerShell scripts, more PowerShell scripts and still more PowerShell scripts. Occasionally you may see some organisational posts.
Tuesday, 5 October 2010
Get-HostByName.ps1
Labels:
powershell,
PowerShell scripts,
System.Net.Dns
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment