how to check variables in each line of the text area and test them for pingPrüfung Ping für mehrere Server - Power
foreach ($textbox1 in $textbox1) {
if (test-Connection -ComputerName $textbox1 -Count 2 -Quiet)
{
$path = "$([Environment]::GetFolderPath("Desktop"))\ping.txt";
"$textbox1 is Pinging " | fl > $path; notepad $path;
}
else
{
$path = "$([Environment]::GetFolderPath("Desktop"))\notping.txt";
"$textbox1 not pinging" | fl > $path; notepad $path;
}
}
Ich möchte individuell für jede Variable in Textbereich überprüfen und jeder, ob es Pings überprüfen oder nicht
Ich bin nicht unterbesetzt Was ist dein Problem, hast du eine Frage? – nkasco
@nkasco Ich habe ein Textfeld, ich möchte die Liste der Computer in es eingeben und überprüfen, ob es in der Lage zu pingen oder nicht ... ich denke, wir können foreach Schleife hier verwenden pls beraten – tictactoe