In Summary: “Each morning I run a PowerShell script the produces “Ping Frames”. The problem is that the ‘ping frames’ just open willy-nilly and stack on top of each other. I simply want the ‘ping frames’ to be in a nice column on the right hand side of my monitor. Two columns if too many “ping frames” to fit monitor.
Each morning I run this script:
$thelist = import-csv “\gofs\Departments\Computer Operations\TicketMaker\eplum_csv\Currentscale.csv”
ForEach ($item in $thelist)
{
$StoreNum = $item.(“Store”)
$DeptNum = $item.(“Department”)
$IPNodes = $item.(“IP Address")
$ScaleAddress = $item.(“Scale Address”)
$Action = $item.(“Active")
$Rsn = $item.(“Inactive Reason")
if ($StoreNum -ne 0 -and $StoreNum -ne 187 -and $StoreNum -ne 188)
{
if ($Action -eq "No")
{
if ($Rsn -eq "" -or $Rsn -eq "Scale was set to inactive - exceeded MaxBatchRetryHours=1")
{
foreach ($IP in $IPNodes)
{
if (Test-Connection -IPAddress $IP -Count 1 -ErrorAction SilentlyContinue)
{
#Write-Host "$IP is UP" -ForegroundColor Blue;
}
Else
{
Write-Host "Store: $StoreNum Dept: $DeptNum IPaddress:$IP is Down" -ForegroundColor Red;
start-process cmd -ArgumentList "/C","mode con:cols=55 lines=2 && title Store: $StoreNum IP: $IP && ping $IP -t"
}
}
}
}
}
}
Write-Host “If Dave can’t do it, nobody can!” -ForegroundColor Green;
Start-Sleep -s 15
"The purpose of the script is to “hold” a constant ping until the “ip address becomes pingable” The problem is when I run the script the frames just stack on top of each other. What I want PowerShell to do is open each one and place it on the right hand side of monitor as a list, not stacked on top of each other. I cannot figure out how to “move them”. I am extremely new to PS and this is my very first project so any help would be greatly appreciated. Thanks!!!