New
#11
Steve,
Would you run this script for me and attach the resulting mysystem.txt file (will be on your desktop) to your next post? Thanks.
# **********************INSTRUCTIONS**************************
# STEP 1 ** RUN POWERSHELL AS ADMINISTRATOR ******************
# ************************************************************
#
# WIN key | type POWERSHELL | do NOT hit ENTER |
# in the PROGRAMS list, right-click on WINDOWS POWERSHELL |
# choose "Run as administrator" |
# Click on the YES button (if such appears)
#
# WIN key = key with Microsoft log on top
#
# for the guru:
# WIN | type POWERSHELL | CTRL+SHIFT+ENTER key combo | ALT+Y keycombo
# ************************************************************
# STEP 2 ** COPY AND PASTE ***********************************
# ************************************************************
#
# COPY the script using CTRL+C,
# COPY every line of script down thru both EXIT statements
#
# PASTE into Powershell
#----Right-Click at the PowerShell Prompt
#----(Ctrl+V does not work)
#
# Start copying with first script line without a # at start of the line
# Note: Actually, you can paste the entire file if you rather
#-------Lines starting with a # are ignored by PowerShell
# ************************************************************
# STEP 3 ** SCRIPT OUTPUT & SCRIPT PURPOSE *******************
# ************************************************************
# --The script output and purpose is given at the very front of the script
#
# --The script output and purpose is given at the very front of the script
#
# ************************************************************
# ***************** NOTE - POWERSHELL VERSION*****************
# if you receive this error msg:
#--The system can not find the path specified
# you may need to update your PowerShell
# you must be using Powershell 2.0 or later.
#
# To determine your Powershell version:
#---Run PowerShell
#---enter $host.version
#---you should see at least:
# Major Minor Build Revision
# ----- ----- ----- --------
# 2......0......-1.....-1
#
# If you do not see the above, update your Vista/Win 7.
# ************************************************************
# *************** NOTE - EXECUTION POLICY*********************
# If you haven't set the execution policy, you may need to:
#---Run PowerShell
#---enter SET-EXECUTIONPOLICY -EXECUTIONPOLICY REMOTESIGNED
# ************************************************************
Script:
# ***********************************************************************
# Places MySystem.txt on your desktop
# MySystem.txt contains info about your system
# ***********************************************************************
function bytesize ($n)
{ If ($n -ge 1tb)
{ $result = "{0:n2}" -f ($n / 1tb) + " TB" }
elseif ($n -ge 1gb)
{ $result = "{0:n2}" -f ($n / 1gb) + " GB" }
elseif ($n -ge 1mb)
{ $result = "{0:n2}" -f ($n / 1mb) + " MB" }
elseif ($n -ge 1kb)
{ $result = "{0:n2}" -f ($n / 1kb) + " KB" }
elseif ( $n -ge 0)
{$result = [string][int]($n) + " bytes" }
else
{ $result = "n/a"}
$result }
function asc2str ($str) {$l=$str.length;$b = "";$j=0
If ($l -gt 1) {
for ($i=0; $i -lt $l; $i +=2) { $b += [char](([byte][convert]::toint16($str[$i],16) * 16) + ([byte][convert]::toint16($str[$i+1],16) ))
$j++ } } $b.trim() }
$sterne = "*" * 79
$obj = new-object -typename PSobject
$os = gwmi win32_operatingsystem
$cs = gwmi Win32_ComputerSystem
$CSprod = gwmi Win32_ComputerSystemProduct
$bios = gwmi win32_bios
$bb = gwmi win32_baseboard
$vc = @(gwmi Win32_VideoController)
$snd = @(gwmi win32_sounddevice)
$dd= @(Gwmi win32_diskdrive)
$CD = @(gwmi win32_cdromdrive)
$cpu = @(gwmi win32_processor)
$kbd = @(gwmi win32_keyboard)
$pntr = @(gwmi win32_pointingdevice)
$mem = gwmi win32_memoryarray
$ram = @(gwmi win32_physicalmemory)
$obj |
add-member -membertype noteproperty -name "MAIN" -value ("") -passthru |
add-member -membertype noteproperty -name "Operating System" -value ($os.caption + " " + $os.csdversion + " " + $os.osarchitecture) -passthru |
add-member -membertype noteproperty -name "Computer Manufacturer,model, version, system type" -value ($cs.manufacturer + " || " + $cs.model + " || " + $csprod.version + " || " + $cs.systemtype) -passthru |
add-member -membertype noteproperty -name "BIOS Version, date, name" -value ($bios.smbiosbiosversion + "||" + $bios.converttodatetime($bios.releasedate) + "||" + $bios.name) -passthru |
add-member -membertype noteproperty -name "Motherboard Manufacturer, Product" -value ($bb.manufacturer + " " + $bb.product)
$cnt = $cpu.count
for ($ndx=1; $ndx -le $cnt; $ndx++) {
$o = $cpu[$ndx -1]
$tmp = "{0:N3}" -f ($o.maxclockspeed / 1000)
$obj | add-member -membertype noteproperty -name ("Processor " + $ndx + "--Description, Manufacturer, Max Speed") -value ($o.Name + " || " + $o.manufacturer + " || " + $tmp + " GB")
}
$obj | add-member -membertype noteproperty -name "VIDEO,SOUND,KEYBOARD,MICE" -value ("")
$cnt = $vc.count
for ($ndx=1; $ndx -le $cnt; $ndx++) {
$o = $vc[$ndx -1]
$obj | add-member -membertype noteproperty -name ("Video Controller " + $ndx + "--Description, Driver Version, Driver Date") -value ($o.caption + " || " + $o.DriverVersion + " || " + $o.converttoDateTime($o.driverdate))
}
$cnt = $snd.count
for ($ndx=1; $ndx -le $cnt; $ndx++) {
$o = $snd[$ndx -1]
$obj | add-member -membertype noteproperty -name ("Sound Device " + $ndx + "--Description, Sound Manufacturer") -value ($o.caption + " || " + $o.Manufacturer)
}
$cnt = $kbd.count
for ($ndx=1; $ndx -le $cnt; $ndx++) {
$o = $kbd[$ndx -1]
$obj | add-member -membertype noteproperty -name ("Keyboard " + $ndx ) -value ($o.name + " " + $o.description)
}
$cnt = $pntr.count
for ($ndx=1; $ndx -le $cnt; $ndx++) {
$o = $pntr[$ndx -1]
IF ($o.manufacturer -eq "(Standard system devices)") {$o.manufacturer = "Mouse"}
elseif (($o.manufacturer -eq "Microsoft") -AND ($o.hardwaretype = "PS/2 Compatible Mouse")) {$o.manufacturer = "Touchpad"}
$obj | add-member -membertype noteproperty -name ("Pointing Device " + $ndx + "--Device, INF file and INF section") -value ($o.manufacturer + " " + $o.hardwaretype + " || " + $o.inffilename + " in " + $o.infsection)
}
$obj | add-member -membertype noteproperty -name "MEMORY" -value ("")
$obj | add-member -membertype noteproperty -name "Total RAM" -value (bytesize(($mem.endingaddress - $mem.startingaddress) * 1024))
$cnt = $ram.count
for ($ndx=1; $ndx -le $cnt; $ndx++) {
$o = $ram[$ndx -1]
$obj | add-member -membertype noteproperty -name ("RAM " + $ndx +"--Manufacturer, Speed, Part #, Serial #, Data width" ) `
-value ((bytesize($o.capacity)) + " || " + $o.manufacturer + " || " + [string]($o.speed) + " MHz " + " || " + $o.partnumber + " || " + $o.serialnumber + " || " + $o.datawidth)
}
$obj | add-member -membertype noteproperty -name "DRIVES" -value ("")
$cnt = $dd.count
for ($ndx=1; $ndx -le $cnt; $ndx++) {
$o = $dd[$ndx -1]
$sernum = (asc2str($o.serialnumber))
$obj | add-member -membertype noteproperty -name ("Drive " + $ndx + "--Size, Model, firmware version, serial number ") -value ((bytesize($o.size)) + " || " + $o.model + " || " + $o.firmwarerevision + " || " + $sernum)
}
$cnt = $cd.count
for ($ndx=1; $ndx -le $cnt; $ndx++) {
$o = $cd[$ndx -1]
$obj | add-member -membertype noteproperty -name ("Optical Drive " + $ndx + "--Name, Revision, Type") `
-value ($o.name + $o.description + " || " + $o.mfrassignedrevisionlevel + " || " + $o.mediatype )
}
#$obj | fl
$obj > $env:userprofile\desktop\MySystem.txt
EXIT
EXIT