Link to home
Start Free TrialLog in
Avatar of kdeutsch
kdeutschFlag for United States of America

asked on

powershell infromation for computers

I have been tasked with getting all kinds of information about a computer when its imaged via a powershell script and have found lost sof bits and pieces around the net.  I am piecing it together but can't help but ask if there is a better way or more efficeit way of caputring all this.

1. Image Location
2. SerialNumber
3. Cpu Architecture
4. cpu name & caption
5. cpu version
6. cpu manufacturer
7. total physical memory
8. #Processors
9. macaddress
10. wireless mac
11. harddrive
12. IP
13. computer name
14. dtCapture
15. OS
16. OSArchitecture
17. Processor speed
18. # of cores

Here is what I have started.
# get the computer name
$computer = gc env:computername
# get the Sn of the current computer
$colItems = get-wmiobject -class "Win32_BIOS" -namespace "root\CIMV2" `

foreach ($objItem in $colItems) {
      write-host "Serial Number: " $objItem.SerialNumber
      $Sn = $objItem.SerialNumber
}

if ($Sn -eq $null)
   {
    write-host "Sn is blank or not avialable"
    write-host "Please Provide the computer SN"
    $Sn = Read-Host
    write-host " The Sn is " $Sn
    }
else
{
    write-host " The Sn is " $Sn
    Write-host " Images at " $Option
  }
 
  write-host "computer name: " $computer

get-wmiobject Win32_Processor | select Architecture,Caption, Name,Version,Manufacturer,ProcessorType

get-wmiobject Win32_ComputerSystem | select @{name="TotalPhysicalMemory(MB)";expression={($_.TotalPhysicalMemory/1mb).tostring("N0")}},NumberOfProcessors
Avatar of Neil Russell
Neil Russell
Flag of United Kingdom of Great Britain and Northern Ireland image

What are you using to image? How many PC's in the org do you intend to image/manage?
ASKER CERTIFIED SOLUTION
Avatar of Neil Russell
Neil Russell
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kdeutsch

ASKER

HI,
I they use ghost to image currently.  Right now they use a vb script to get some of the information and pump into a database.  I am chagning it to a powershell script for future ease of managing and trying to get more information than the current vb script provides.  it only gets about 5 items of my list above.  Each time a computer is imaged it just goes and grabs this script and runs it soe its individual based but happenns maybe 5 times a day or sometimes more.
thanks