I have a list of IPs that is stored in .txt file at C:\IPs.txt
10.0.0.0
100.0.0.0
And a PowerShell script that executes commands for each entry in that file.
Get-Content C:\IPs.txt |ForEach-Object { Write-Host 1 - $_ }
So that command returns
1 - 10.0.0.0
1 - 100.0.0.0
How can I add +1 to a digit, so that PowerShell command would return:
1 - 10.0.0.0
2 - 100.0.0.0