Chapters/final-exam/Step2.ps1
# get adapters $comp = 'localhost' $s = New-CimSession -ComputerName $comp $adapters = Get-NetAdapter -CimSession $s | Where Status -ne 'Disconnected' # given an adapter, get addresses # we hardcoded an interface index we know exists $index = 7 $addresses = Get-NetIPAddress -InterfaceIndex 7 -CimSession $s |