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:
Enumerate Hardware Information
This script will query the below info on the computer you enter in on the form. This will not show the partitions swap file (page file) size.
CPU:
- CPU Speed MHZ
- CPU Manufacture
- CPU Type
- CPU Current Load
Memory:
- Memory Bank
- Memory Stick Size MB
- Memory Speed MHZ
- Memory Type
Hard Drive:
- HD Model
- HD Size GB
- HD # of Partions
- HD Type
- Drive Letter
- Used Space
- Free Space
- Size of Partion
- Free Space %
<% '**************************************************** ' Script Witten by Larry Heintz ' December 2005 www.windowsadminscripts.com ' This script will query the below info on the computer ' you enter in on the form. This will not show the ' partitions swap file (page file) size. ' ' CPU: ' - CPU Speed MHZ ' - CPU Manufacture ' - CPU Type ' - CPU Current Load ' ' Memory ' - Memory Bank ' - Memory Stick Size MB ' - Memory Speed MHZ ' - Memory Type ' ' Hard Drive ' - HD Model ' - HD Size GB ' - HD # of Partions ' - HD Type ' - Drive Letter ' - Used Space ' - Free Space ' - Size of Partion ' - Free Space % '**************************************************** cmd = Request.Form ("cmd") Select Case cmd Case "getDetails" getDetails Case Else showForm End Select Sub getDetails On Error Resume Next ' Sets table row background color trbgcolor1 = "#FFFAF0" trbgcolor2 = "#FDF8FF" trbgcolor3 = "#FDD9FF" trbgcolor4 = "#F8FFDD" servername = Request.Form ("servername")%> <%showForm%> <%if not (errorChecking (servername)) then%>
CPU,Memory,Hard Drive Information for <%=ucase(servername)%>
CPU Information
<%getCPUinfo servername%>
Memory Information
<%getMemoryinfo servername%>
Hard Drive Spec Information
<%getHDSpecinfo servername%>
Hard Drive Space Information
<%getHDSpaceinfo servername%>
<%end if%> <%End Sub%> <%Sub showForm%>
" method="post">
Computer Name:
<%End Sub%> <%Sub getCPUinfo (servername) 'Connects to computer via WMI to get 'CPU Speed MHZ,CPU Manufacture,CPU Type,CPU Current Load For each objCPU in GetObject("winmgmts:{impersonationLevel=impersonate}\\" & servername & "\root\cimv2").InstancesOf("Win32_Processor") Select Case objCPU.Family Case 2 cputype = "Unknown" Case 11 cputype = "Pentium brand" Case 12 cputype = "Pentium Pro" Case 13 cputype = "Pentium II" Case 14 cputype = "Pentium processor with MMX technology" Case 15 cputype = "Celeron " Case 16 cputype = "Pentium II Xeon" Case 17 cputype = "Pentium III" Case 28 cputype = "AMD Athlon Processor Family" Case 29 cputype = "AMD Duron Processor" Case 30 cputype = "AMD2900 Family" Case 31 cputype = "K6-2+" Case 130 cputype = "Itanium Processor" Case 176 cputype = "Pentium III Xeon" Case 177 cputype = "Pentium III Processor with Intel SpeedStep Technology" Case 178 cputype = "Pentium 4" Case 179 cputype = "Intel Xeon" Case 181 cputype = "Intel Xeon processor MP" Case 182 cputype = "AMD AthlonXP Family" Case 183 cputype = "AMD AthlonMP Family" Case 184 cputype = "Intel Itanium 2" Case 185 cputype = "AMD Opteron™ Family" End Select%>
CPU MHZ:
<%=objCPU.CurrentClockSpeed%>
CPU Manufacture:
<%=objCPU.Manufacturer%>
CPU Type:
<%=cputype%>
CPU Current Load:
<%=objCPU.LoadPercentage%>%
<%next set objCPU = nothing End Sub%> <% Sub getMemoryInfo (servername) 'Connects to computer via WMI to get '# of Memory Bank,Memory Stick Size in MB,Memory Speed MHZ,Memory Type For Each objMem In GetObject("winmgmts:{impersonationLevel=impersonate}\\" & servername & "\root\cimv2").InstancesOf("Win32_PhysicalMemory") Select Case objMem.MemoryType Case 0 rtype = "Unknown" Case 1 rtype = "Other" Case 2 rtype = "DRAM" Case 3 rtype = "Synchronous DRAM" Case 4 rtype = "Cache DRAM" Case 5 rtype = "EDO" Case 6 rtype = "EDRAM" Case 7 rtype = "VRAM" Case 8 rtype = "SRAM" Case 9 rtype = "RAM" Case 10 rtype = "ROM" Case 11 rtype = "Flash" Case 12 rtype = "EEPROM" Case 13 rtype = "FEPROM" Case 14 rtype = "EPROM" Case 15 rtype = "CDRAM" Case 16 rtype = "3DRAM" Case 17 rtype = "SDRAM" Case 18 rtype = "SGRAM" Case 19 rtype = "RDRAM" Case 20 rtype = "DDR" End Select%>
Memory Bank:
<%=objMem.BankLabel%>
Memory Size:
<%=objMem.Capacity/1024/1024%> MB
Memory Speed:
<%=objMem.Speed%> MHZ
Memory Type:
<%=rtype%>
<%next set objMem = nothing End Sub%> <%Sub getHDSpecInfo (servername) 'Connects to computer via WMI to get 'HD Model,HD Size in GB,HD # of Partions,HD Type For Each objHDInfo In GetObject("winmgmts:{impersonationLevel=impersonate}\\" & servername & "\root\cimv2").InstancesOf("Win32_DiskDrive")%>
Hard Drive Model:
<%=objHDInfo.Model%>
Hard Drive Size:
<%=clng(objHDInfo.Size/1024/1024/1024)%> GB
# of Partitions:
<%=objHDInfo.Partitions%>
Hard Drive Type:
<%=objHDInfo.InterfaceType%>
<%Next set objHDinfo = nothing End Sub%> <%Sub getHDSpaceInfo (servername) 'Connects to computer via WMI to get 'Drive Letter,Used Space,Free Space,Size of Partion,Free Space % For Each objDisk In GetObject("winmgmts:{impersonationLevel=impersonate}\\" & servername & "\root\cimv2").InstancesOf("Win32_LogicalDisk Where DriveType = '3'") freespace = left(objDisk.freespace/1024/1024/1024,4) totalspace = left(objDisk.size/1024/1024/1024,4) usedspace = left(totalspace/freespace,4) freeperct = left(100/usedspace,2)%>
Drive Letter:
<%=objDisk.deviceid%>
Used Space:
<%=usedspace%> GB
Free Space:
<%=freespace%> GB
Total Space:
<%=totalspace%> GB
Free:
<%=freeperct%>%
<%next set objDisk = nothing End Sub%> <%Function errorChecking(ComputerName) errorChecking = False if err.number <> 0 then if err.number = "462" then Response.write (ComputerName & ",Error,Unable to connect") err.Clear () errorChecking = True elseif err.number = "70" then 'General access denied error Response.write (ComputerName & ",Error,Permission Denied while trying to connect.") err.Clear () errorChecking = True elseif err.number = "451" then 'HEX Error is: 1C3 Response.write (ComputerName & "," & hex(err.number) & ",Error,Permission Denied while trying to connect.") err.Clear () errorChecking = True elseif err.number = "800a0046" then Response.write (ComputerName & "," & hex(err.number) & ",Error,Permission Denied while trying to connect.") err.Clear () errorChecking = True elseif err.number = "-2147023174" then 'The RPC server is unavailable. Response.write (ComputerName & ",Error,Unable to connect error number -2147023174.") err.Clear () errorChecking = True elseif err.number = "-2147023836" then Response.write (ComputerName & ",Error,Unable to connect error number --2147023836.") err.Clear () errorChecking = True elseif err.number = "-2147022986" then Response.write (ComputerName & ",Error,Unable to connect error number -2147022986.") err.Clear () errorChecking = True else Response.write ("Error is: " & err.number) Response.write ("HEX Error is: " & hex(err.number)) Response.write ("Desc. is: " & err.Description) Response.write ("Source is: " & err.Source) err.Clear () end if end if end Function%>
Copyright 2006 WindowsAdminScripts.com all rights reserved.