1+ $computer = gwmi Win32_ComputerSystem
2+ $os = gwmi Win32_OperatingSystem
3+ $processor = gwmi Win32_Processor
4+ $display = gwmi Win32_DisplayConfiguration
5+ $uptime = $os.ConvertToDateTime ($os.LocalDateTime ) - $os.ConvertToDateTime ($os.LastBootUpTime )
6+
7+ $info = `
8+ " Computer: " , " $ ( $computer.Model ) , $ ( $computer.Manufacturer ) " ,
9+ " OS: " , " $ ( $os.Caption ) $ ( $os.OSArchitecture ) " ,
10+ " Kernel: " , " $ ( $os.Version ) " ,
11+ " CPU: " , " $ ( $processor.Name ) " ,
12+ " GPU: " , " $ ( $display.DeviceName ) " ,
13+ " Uptime: " , " $ ( $uptime.Days ) d $ ( $uptime.Hours ) h $ ( $uptime.Minutes ) m $ ( $uptime.Seconds ) s" ,
14+ " Memory: " , " $ ( [math ]::Truncate($os.FreePhysicalMemory / 1 KB )) MB / $ ( [math ]::Truncate($computer.TotalPhysicalMemory / 1 MB )) MB" ,
15+ " Shell: " , " PowerShell v$ ( $Host.Version ) "
16+
17+ $logo = `
18+ " .:::.. " , " red" , " $ ( $info [0 ]) " , " gray" , " $ ( $info [1 ]) `r`n " , " white" ,
19+ " ccccccccccc. " , " red" , " $ ( $info [2 ]) " , " gray" , " $ ( $info [3 ]) `r`n " , " white" ,
20+ " :ccccccccccc" , " red" , " :Cc. :c " , " green" , " $ ( $info [4 ]) " , " gray" , " $ ( $info [5 ]) `r`n " , " white" ,
21+ " ccccccccccc." , " red" , " ooooooooooo. " , " green" , " $ ( $info [6 ]) " , " gray" , " $ ( $info [7 ]) `r`n " , " white" ,
22+ " :cccccccccc:" , " red" , " cooooooooooc " , " green" , " $ ( $info [8 ]) " , " gray" , " $ ( $info [9 ]) `r`n " , " white" ,
23+ " .oc::'':cccc" , " red" , " .ooooooooooo. " , " green" , " $ ( $info [10 ]) " , " gray" , " $ ( $info [11 ]) `r`n " , " white" ,
24+ " .:ccocc." , " blue" , " oooooooooooc " , " green" , " $ ( $info [12 ]) " , " gray" , " $ ( $info [13 ]) `r`n " , " white" ,
25+ " :oooooooocoo" , " blue" , " .coCoCooc. " , " green" , " $ ( $info [14 ]) " , " gray" , " $ ( $info [15 ]) `r`n " , " white" ,
26+ " oooooooooco." , " blue" , " COo. " , " yellow" , " ''" , " green" , " .cCc `r`n " , " yellow" ,
27+ " :ooooooooooc" , " blue" , " cOCCCCCCCCCC: `r`n " , " yellow" ,
28+ " ooooooooooo." , " blue" , " CCCCCCCCCCO: `r`n " , " yellow" ,
29+ " cc:. .:co:" , " blue" , " oOCCCCCCCCOo `r`n " , " yellow" ,
30+ " .OCCCCCCCCCO. `r`n " , " yellow" ,
31+ " .coCCCoc. `r`n " , " yellow"
32+
33+ clear
34+ for ($i = 0 ; $i -lt $logo.Length ; $i += 2 ) {
35+ $str = $logo [$i ]
36+ $color = $logo [$i + 1 ]
37+ Write-Host $str -f $color - nonewline
38+ }
39+
40+ Write-Host
0 commit comments