How to get the values of Manipulate Command variables programmatically into some variables for further use Joel CoehoornJoel Coehoorn 28.6k1717 gold badges9797 silver badges145145 bronze badges 1 In PS (for TCP) in place of parsing netstat just use get-nettcpconnection -- and it has localport being a separate house more simply https://thomash183hig8.bimmwiki.com/user