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.

Batch: DNS-Suffix von Server

Empfohlene Antworten

Veröffentlicht

Hallo Zusammen! :)

Ich habe leider folgendes Problem:

Wie kann ich mit Hilfe einer Batch von meinem PC aus den DNS-Suffix eines Servers auslesen?

Hintergrund:

Habe eine Liste mit 400 Servern, bei denen Überprüft werden soll, ob Sie den richtigen DNS-Suffix besitzen.

Hoffe irgendwer hat eine Idee. :)

Danke schonmal im vorraus.

Viele Greetz

Habs doch geschafft eine Lösung für zu finden. =)

Falls es irgendwer mal gebrauchen kann:

- Rechner aus Liste (Serverliste.txt) anpingen

- DNS-Suffix von Rechnern aus Liste (Serverliste.txt) auslesen

( in dem Beispiel können 2 DNS Suffix angegeben werden)

@echo off

set /a cnt1=0

set /a cnt2=0

set /a cnt3=0

for /f "tokens=1" %%i in (serverlist.txt) do call :loop1 %%i

call :Gesammt

call:end

:loop1

ping %1>NUL

echo Server: %1

echo Errorcode: %errorlevel%

if %errorlevel% == 0 call :an %1

if not %errorlevel% == 0 call :aus %1

goto:eof

:an

call :nslookup %1

call :nslookup2 %1

set /a cnt1+=1

echo %1 Ping OK %DNS1% %DNS2%>> Ergebnis.txt

goto:eof

:aus

call :nslookup %1

call :nslookup2 %1

set /a cnt2+=1

echo %1 Ping error %DNS1% %DNS2%>> Ergebnis.txt

goto:eof

:nslookup

nslookup %1.*DNS-Suffix1* >> Temp.txt

for /f "delims= skip=1" %%j in ('findstr "*DNS-Suffix1*" Temp.txt') do (

call :dir

del Temp.txt

goto:eof

)

call :no_dir

del Temp.txt

goto:eof

:nslookup2

nslookup %1.*DNS-Suffix2* >> Temp2.txt

for /f "delims=" %%j in ('findstr "*DNS-Suffix2*" Temp2.txt') do (

call :dir2

del Temp2.txt

goto:eof

)

call :no_dir2

del Temp2.txt

goto:eof

:dir

set DNS1=*DNS-Suffix1*

goto:eof

:no_dir

set DNS1=no *DNS-Suffix1*

goto:eof

:dir2

set DNS2=*DNS-Suffix2*

goto:eof

:no_dir2

set DNS2=no *DNS-Suffix2*

goto:eof

:Gesammt

set /a cnt3=cnt1+cnt2

echo on: %cnt1%

echo off: %cnt2%

echo Total: %cnt3%

echo on: %cnt1% >> Statistik.txt

echo off: %cnt2% >> Statistik.txt

echo Total: %cnt3% >> Statistik.txt

goto:eof

:end

pause

exit

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.