none
Container object's NetworkAdapters property doesn't return info about Status and IPAddresses RRS feed

  • Question

  • Container object's NetworkAdapters property doesn't return info about Status and IPAddresses:

    PS C:\> (Get-Container).NetworkAdapters

    Name            IsManagementOs VMName          SwitchName     MacAddress   Status IPAddresses
    ----            -------------- ------          ----------     ----------   ------ -----------
    Network Adapter False          FirstContainer  Virtual Switch 000000000000                  
    Network Adapter False          SecondContainer Virtual Switch 000000000000                  
    Network Adapter False          ThirdContainer  Virtual Switch 000000000000                  


    Aleksandar Nikolić http://powershellers.blogspot.com http://twitter.com/alexandair

    Sunday, October 18, 2015 10:35 PM

All replies

  • I found this problem and finally solve it by the command "Invoke-Command"

    You should start your container first. Then type in the following script in your powershell command line.

    Invoke-Command -ContainerId [your container's id] -ScriptBlock {((ipconfig|findstr 'IPv4') -split ": ")[1]}

    Thursday, October 29, 2015 7:40 AM