sabine

Login Script nur bei bestimtmer IP Adresse ausführen

W2003 Loginscript oder GPO?

Hallo,

ich habe einen W2003 Server und möchte das Loginscript nur dann ausführen, wenn der Rechner eine IP adresse aus einem bestimmten Bereich hat. Gibt es da eine Möglichkeit?
Kann ich eine Abfrage (??? welche????) in das Loginscript einbauen? Oder funktioniert es vielleicht über GPO?

Danke

Sabine
Auf Facebook teilen
Auf X (Twitter) teilen
Auf Reddit teilen
Auf Linkedin teilen

Content-ID: 8477

Url: https://administrator.de/forum/login-script-nur-bei-bestimtmer-ip-adresse-ausfuehren-8477.html

Ausgedruckt am: 16.07.2025 um 09:07 Uhr

gemini
gemini 23.03.2005 um 15:32:43 Uhr
Probier mal das aus, musst halt noch anpassen

~~~~~~~~~~~~~~~~~~~~
'System Administration: Script to view IP address on remote machine
'September 25, 2003
'Author: Rod Trent
'Platform: Windows NT with WSH 2.0, and WMI 1.1, Windows 2000
'Type: WSH, VBScript

'GetIP will prompt for a computer name, connect to the computer using
'the WMI, and retrieve the IP Address. This will work for both remote
'and local computers. To get the local computer's IP Address, type in
'"localhost" (without the quotes) as the computer name.

'This script must be saved as a .VBS file and run with CScript.

ComputerName = InputBox("Enter the name of the computer you wish to query")

set IPConfigSet = GetObject("winmgmts:{impersonationLevel=impersonate}!//"& ComputerName &"").ExecQuery("select IPAddress from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")

for each IPConfig in IPConfigSet
  if Not IsNull(IPConfig.IPAddress) then
    for i=LBound(IPConfig.IPAddress) to UBound(IPConfig.IPAddress)
    WScript.Echo "IPAddress: " & IPConfig.IPAddress(i)
    next
  end if
next
~~~~~~~~~~~~~~~~~~~~
Sabine
Sabine 23.03.2005 um 16:35:45 Uhr
Danke fürs erste. Hat mir schon ein wenig weiter geholfen. Jetzt spiel ich mich ein wenig!
Egbert
Egbert 23.03.2005 um 19:35:21 Uhr
Hallo Sabine,

alles was Du so mit logon Scripts machen kannst kannst Du auch mit den GPO erweiterungen von DesktopStandard machen. Hier hast Du auch genaus diese Filterfunktionen nach IP Adresse zur Verfügung und viele mehr.

Ein Blick lohnt sich und das ganze ist auch sehr preisgünstig.

[ad deleted, sorry. die mods]

Gruß
Egbert