For my Reboot Script I needed to get the last character of the computername and convert it to an integer.

We can do it like this in PowerShell: