It iterates by way of every line through the output of the subsequent command: netstat -aon @RodionSychev The powershell command is anticipating you to interchange "portNumber" with the port quantity you are looking for. The error states that "portNumber" isn't a quantity. In such a case the executable name is https://helpmehigh.com/