$scriptpath = Split-Path $MyInvocation.MyCommand.Path -Parent
$finalpath = Join-Path $scriptpath 'IPs.txt'
$finalpath
[string[]]$IPaddresses = Get-Content -Path $finalpath
$IPaddresses
$scriptpath = Split-Path $MyInvocation.MyCommand.Path -Parent
$finalpath = Join-Path $scriptpath 'IPs.txt'
$finalpath
[string[]]$IPaddresses = Get-Content -Path $finalpath
$IPaddresses