PoshCode Archive  Artifact [87bbe70bc7]

Artifact 87bbe70bc74e73f20d07311af4789f3dfdb66ce6459bf95925ba20aae579228d:

  • File Get-DetailedSystemInform.ps1 — part of check-in [ef5798fbdf] at 2018-06-10 13:05:57 on branch trunk — From Windows PowerShell Cookbook (O’Reilly) by Lee Holmes (user: Lee Holmes size: 1690)

# encoding: ascii
# api: powershell
# title: Get-DetailedSystemInform
# description: From Windows PowerShell Cookbook (O’Reilly) by Lee Holmes
# version: 0.1
# author: Lee Holmes
# license: CC0
# x-poshcode-id: 2151
# x-archived: 2016-03-19T02:53:00
# x-published: 2011-09-09T21:40:00
#
#
##############################################################################
##
## Get-DetailedSystemInformation
##
## From Windows PowerShell Cookbook (O'Reilly)
## by Lee Holmes (http://www.leeholmes.com/guide)
##
##############################################################################

<#

.SYNOPSIS

Get detailed information about a system.

.EXAMPLE

Get-DetailedSystemInformation LEE-DESK > output.txt
Gets detailed information about LEE-DESK and stores the output into output.txt

#>

param(
    ## The computer to analyze
    $Computer = "."
)

Set-StrictMode -Version Latest

"#"*80
"System Information Summary"
"Generated $(Get-Date)"
"#"*80
""
""

"#"*80
"Computer System Information"
"#"*80
Get-WmiObject Win32_ComputerSystem -Computer $computer | Format-List *

"#"*80
"Operating System Information"
"#"*80
Get-WmiObject Win32_OperatingSystem -Computer $computer | Format-List *

"#"*80
"BIOS Information"
"#"*80
Get-WmiObject Win32_Bios -Computer $computer | Format-List *

"#"*80
"Memory Information"
"#"*80
Get-WmiObject Win32_PhysicalMemory -Computer $computer | Format-List *

"#"*80
"Physical Disk Information"
"#"*80
Get-WmiObject Win32_DiskDrive -Computer $computer | Format-List *

"#"*80
"Logical Disk Information"
"#"*80
Get-WmiObject Win32_LogicalDisk -Computer $computer | Format-List *