troubleshooting Question

powershell infromation for computers

Avatar of kdeutsch
kdeutschFlag for United States of America asked on
Scripting LanguagesPowershell
4 Comments1 Solution518 ViewsLast Modified:
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
ASKER CERTIFIED SOLUTION
Neil Russell
Solution Development Specialist

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros