Skip to content

Instantly share code, notes, and snippets.

@artisticcheese
Created December 17, 2018 22:02
Show Gist options
  • Save artisticcheese/7467954280c1de6f3ceb2d2f0b1647c6 to your computer and use it in GitHub Desktop.
Save artisticcheese/7467954280c1de6f3ceb2d2f0b1647c6 to your computer and use it in GitHub Desktop.
ps1.ps1
PS D:\ntt> $nicInfo.IpConfigurations.Count
2
PS D:\ntt> $nicInfo.IpConfigurations[0]
PrivateIpAddressVersion Name Primary PrivateIpAddress PrivateIpAllocationMethod Subnet Name PublicIpAddress Name ProvisioningState
----------------------- ---- ------- ---------------- ------------------------- ----------- -------------------- -----------------
IPv4 ipconfig1 True 10.233.0.4 Dynamic Succeeded
PS D:\ntt> $nicInfo.IpConfigurations.GetType()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True List`1 System.Object
PS D:\ntt> $nicInfo.IpConfigurations[0]
PrivateIpAddressVersion Name Primary PrivateIpAddress PrivateIpAllocationMethod Subnet Name PublicIpAddress Name ProvisioningState
----------------------- ---- ------- ---------------- ------------------------- ----------- -------------------- -----------------
IPv4 ipconfig1 True 10.233.0.4 Dynamic Succeeded
PS D:\ntt> $nicInfo.IpConfigurations.ForEach({$_})
PS D:\ntt>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment