FYI I captured this as a work item for PowerShell Community Extensions v.next:
http://www.codeplex.com/PowerShellCX...rkItemId=11295
--
Keith
"Keith Hill [MVP]" <r_keith_hill@mailhot.nospamIdotcom> wrote in message news:eRM04IctHHA.768@TK2MSFTNGP04.phx.gbl...
If you did this a lot I would consider modifying the type data for System.Net.IPAddress to add a BegEndianAddress property like so:
Create an IPAddress.ps1xml file with these contents:
<?xml version="1.0" encoding="utf-8" ?>
<Types>
<Type>
<Name>System.Net.IPAddress</Name>
<Members>
<ScriptProperty>
<Name>BigEndianAddress</Name>
<GetScriptBlock>
$bytes=$this.GetAddressBytes()
[array]::Reverse($bytes)
[BitConverter]::ToUInt32($bytes,0)
</GetScriptBlock>
</ScriptProperty>
</Members>
</Type>
</Types>