title: Change 3rd octet of IP in string format using PowerShell
body: <p>Think I've found the worst way to do this:</p>
  
  <pre><code>$ip = "192.168.13.1"
  $a,$b,$c,$d = $ip.Split(".")
  [int]$c = $c
  $c = $c+1
  [string]$c = $c
  $newIP = $a+"."+$b+"."+$c+"."+$d
  
  $newIP
  </code></pre>
  
  <p>But what is the best way?  Has to be string when completed.  Not bothered about validating its a legit IP.</p>