sabine
Goto Top

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

Content-Key: 8477

Url: https://administrator.de/contentid/8477

Printed on: April 24, 2024 at 23:04 o'clock

Member: gemini
gemini Mar 23, 2005 at 14:32:43 (UTC)
Goto Top
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
~~~~~~~~~~~~~~~~~~~~
Member: Sabine
Sabine Mar 23, 2005 at 15:35:45 (UTC)
Goto Top
Danke fürs erste. Hat mir schon ein wenig weiter geholfen. Jetzt spiel ich mich ein wenig!
Member: Egbert
Egbert Mar 23, 2005 at 18:35:21 (UTC)
Goto Top
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