Users/Groups
Delete Disabled Users
Delete Disabled Users
Enum. Users
Enum. Users
Delete Users
Add Users
Enum. Groups
Enum. Groups
Change Groups
Add Group
Active Directory
Enum. AD Groups
Enum. AD Users
List AD Users w/Prop
Join AD Users
NIC/IP Addresses
Get IP Addresses
Get IP Addresses
Backup and Restore IP's
Add IP's
NIC Settings
OS/Hardware
OS Info Script
OS Info Script All
OS Info Script All
OS System Count
Hardware Info Script
Hardware Info Script #1
Hardware Info Script #2
CPU Settings
Enum. Printers
Disk Quotas
Disable Disk Quota
Enable Disk Quota
Disk Quota Query
Disk Quota Update
Shares/Files/Sessions
Enum. Shares
Enum. Shares
Enum. All Shares
Enum. Open Files
Enum. Open Files
Enum. Open Sessions
Others
Servers Uptime
DNS Stuff
Services Enum
Services Enum
Enum Processes
Enum Hot Fixes
MS FTP Server
FTP VD Query
FTP VD Delete
FTP Site Enum.
MS WWW Server
WWW Site Enum.
Enum Mime Types
Enum Mime Types
Application Pools
Application Pool Enum
Application Pool Enum
Create Application Pool
Create Application Pool
Delete Application Pool
Enum Apps in App Pool
Enum App Pool Settings
Move Apps Between App Pools
Others
IIS Component Probe
IIS Status
Enum SQL Dbases
Backup SQL Dbases
Orphan SQL Users
List AD/WG
My AD/WG Name
My PC Name
Enum AD Computers
Contact Us Form
SM Login Form Code
Imail Login Form Code
Enum. Domains in Imail
Enum. Users in Imail
CDONTS Component
CDOSYS Component
SA SMTP Component
App Pool Monitor
Ping and Tracert
Hard Drive Monitoring
Uptime Monitoring
Desktop Lock
CD Key Revealer
MIK Restarter
Site Map
About the Site
RSS Feeds I Read
Custom Scripts
Visitor #:
windowsadminscripts.com
www
Script:
Query IP Addresses
This script will query all IP Addresses on all NIC cards that have TCP/IP enabled on it on the computer you enter in on the form.
Email Address To Send Sample Code To:
@
<% '**************************************************** ' Script Witten by Larry Heintz ' March 2005 www.windowsadminscripts.com ' This script will query all IP Addresses on all NIC ' cards that have TCP/IP enabled on it on the computer ' you enter in on the form. '**************************************************** On Error Resume Next Response.Buffer = false server.ScriptTimeout = 60000 ' Gets stuff from form run = Request.Form ("run") ' Looks to see what sub to call bases on the cmd value Select Case run Case "getips" getIPS Case else showMain End Select %> <% Sub showMain %>
Get List of IP Addresses
Server Name:
<%End Sub Sub getIPS servername = Request.Form("server") showMain 'Shows Input Form Sub%>
Server Name:
<%=ucase(servername)%>
<%set IPConfigSet = GetObject("winmgmts:{impersonationLevel=impersonate}\\" & servername & "\root\cimv2").ExecQuery _ ("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled=TRUE") for each IPConfig in IPConfigSet ''/// Gets All the IP Address if Not IsNull(IPConfig.IPAddress) then for i=LBound(IPConfig.IPAddress) to UBound(IPConfig.IPAddress) %>IP Address: <%=IPConfig.IPAddress(i)%>
<% next end if ''/// Gets the Default Gateway IP if Not IsNull(IPConfig.DefaultIPGateway) then for i=LBound(IPConfig.DefaultIPGateway) to UBound(IPConfig.DefaultIPGateway) %>
Default IP Gateway(s)
: <%=IPConfig.DefaultIPGateway(i)%>
<% next end if ''/// Gets the DNSServerSearchOrder of the card if Not IsNull(IPConfig.DNSServerSearchOrder) then for i=LBound(IPConfig.DNSServerSearchOrder) to UBound(IPConfig.DNSServerSearchOrder) %>
DNS Servers
: <%=IPConfig.DNSServerSearchOrder(i)%>
<% next end if ''/// Gets the DNSHostName of the card if Not IsNull(IPConfig.DNSHostName) then %>
DNSHostName
: <%=IPConfig.DNSHostName%>
<% end if ''/// Gets the MAC Address of the card if Not IsNull(IPConfig.MACAddress) then %>
MAC Address
: <%=IPConfig.MACAddress%>
<% end if next set IPConfigSet = nothing%>
<%End Sub%> <%if err.number <> 0 then response.Write("
There was an issue connecting to the computer. Please check the computer name.
") end if%>
Copyright 2006 WindowsAdminScripts.com all rights reserved.