church,
carry out following and upload the resulting computerinfo.txt file.
# **********************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
# ************************************************************
PHP:
function get-ID {
param ([string]$title, [int]$arraycnt, [int]$arrayndx)
$id = " " + $title + " "
If ($arraycnt -ne 1) {$id = $id + [string]$arrayndx + " "}
$id }
function get-title { param ([string]$id)
$hashes = ([int](51 - $id.length)/2)
$hashstr = '#' * $hashes
$title = $hashstr + $id + $hashstr
If ($title.length -le 51) {$title += "#"}
$title }
$sterne = "*" * 79
$obj = New-Object PSObject
$bios = gwmi win32_bios
$id = get-id "BIOS" 1 0
$obj | Add-member -membertype noteproperty -name (Get-title $id ) -value $sterne
$obj | add-member -membertype noteproperty -name ($id + "Name") -value($bios.name)
$obj | add-member -membertype noteproperty -name ($id + "Manufacturer") -value($bios.manufacturer)
$obj | add-member -membertype noteproperty -name ($id + "Release Date") -value($bios.converttodatetime($bios.releasedate))
$obj | add-member -membertype noteproperty -name ($id + "Serial Number") -value($bios.SerialNumber)
$CS = gwmi Win32_ComputerSystem
$id = get-id "COMPUTER SYSTEM" 1 0
$obj | Add-member -membertype noteproperty -name (Get-title $id) -value $sterne
$obj | add-member -membertype noteproperty -name ($id + "Manufacturer") -value($cs.manufacturer)
$obj | add-member -membertype noteproperty -name ($id + "Model") -value($cs.model)
$obj | add-member -membertype noteproperty -name ($id + "Primary Owner") -value($cs.primaryownername)
$obj | add-member -membertype noteproperty -name ($id + "Type") -value($cs.systemtype)
$obj | add-member -membertype noteproperty -name ($id + "Total Memory") -value(([string][int]($cs.totalphysicalmemory/1073741824) + " GB"))
$obj | add-member -membertype noteproperty -name ($id + "User Name") -value($cs.username)
$CSprod = gwmi Win32_ComputerSystemProduct
$obj | add-member -membertype noteproperty -name ($id + "Product Name") -value($csprod.name)
$obj | add-member -membertype noteproperty -name ($id + "Version") -value($csprod.version)
$obj | add-member -membertype noteproperty -name ($id + "Identifying Number") -value($csprod.identifyingnumber)
$obj | add-member -membertype noteproperty -name ($id + "Vendor") -value($csprod.vendor)
$obj > $env:userprofile\desktop\COMPUTERINFO.TXT
EXIT
EXIT