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:
powershell
Download
$i = [int]"$((gc env:computername)[-1])"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:
$i = [int]"$((gc env:computername)[-1])"