Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Powershell DNS Name auflösen (war: Brauch mal kurz hilfe in .net)

Empfohlene Antworten

Veröffentlicht

Ich hab dieses Script im netz gefunden:

$erroractionpreference = "SilentlyContinue"

$a = New-Object -comobject Excel.Application

$a.visible = $True

$b = $a.Workbooks.Add()

$c = $b.Worksheets.Item(1)

$c.Cells.Item(1,1) = "Machine Name"

$c.Cells.Item(1,2) = "Ping Status"

$d = $c.UsedRange

$d.Interior.ColorIndex = 19

$d.Font.ColorIndex = 11

$d.Font.Bold = $True

$d.EntireColumn.AutoFit($True)

$intRow = 2

$colComputers = get-content C:\PingListe.txt

foreach ($strComputer in $colComputers)

{

$c.Cells.Item($intRow, 1) = $strComputer.ToUpper()

# This is the key part

$ping = new-object System.Net.NetworkInformation.Ping

$Reply = $ping.send($strComputer)

if ($Reply.status –eq “Successâ€)

{

$c.Cells.Item($intRow, 2) = “Onlineâ€

}

else

{

$c.Cells.Item($intRow, 2) = "Offline"

}

$Reply = ""

$intRow = $intRow + 1

}

$d.EntireColumn.AutoFit()

das script sucht aus einer txt ip's und pingt diese an und packt das ergebenis für die ip als offline oder online in eine excel tabelle.

da ich von .net leider absolut keine ahnung habe, wollte ich fragen ob mir einer erklären kann, wie ich das ergebniss so erweitere das gleichzeitig der dns name mit aufgelöst wird und in die tabelle gepackt wird.

danke!

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.