2022-03-17 10:56:37 -04:00
2021-04-28 09:56:55 -04:00
2021-04-28 09:56:39 -04:00
2021-05-05 17:53:14 -04:00
2021-06-29 10:42:33 -04:00
2021-04-20 10:08:24 -04:00
2022-03-17 10:56:37 -04:00

Sysinfo

A script to output to output basic system information.

Usage

  1. Download the .ps1 file.
  2. Run from CMD with C:\Path\to\sysinfo.ps1

Features

It currently outputs:

  • The Hostname
  • The CPU name
  • The CPU Architecture
  • The OS Version
  • The OS Architecture
  • The System's Manufacturer
  • The System's Model name
  • The system's serial number
  • The GPU model name
  • The amount of system RAM

Quick Run

From USB Stick

Download the USB_Run.zip latest release from Releases.

Unzip and copy the folder to a USB stick.

Click on the file quickrun.bat

This will put the output file into the directory it was run from.

From Web

Copy and past into CMD

[Note:] must be run from an admin prompt. This command is broken out below.

Powershell.exe -command "$current_execution_policy = Get-ExecutionPolicy; Set-ExecutionPolicy Bypass CurrentUser; (New-Object System.Net.WebClient).DownloadFile('https://efrick.ddns.net/git/efrick/Sysinfo/raw/branch/master/sysinfo.ps1', 'sysinfo.ps1'); .\sysinfo.ps1 -write_output;rm .\sysinfo.ps1; Set-ExecutionPolicy $current_execution_policy CurrentUser"

This copies the bat file to a temporary location and runs it with the command switch to write the results to the desktop.

Powershell Breakout

Below is a breakout of the Powershell commands run by the Quickrun above.

$current_execution_policy = Get-ExecutionPolicy
Set-ExecutionPolicy Bypass CurrentUser
(New-Object System.Net.WebClient).DownloadFile("https://efrick.ddns.net/git/efrick/Sysinfo/raw/branch/master/sysinfo.ps1", "sysinfo.ps1")
.\sysinfo.ps1 -write_output
rm .\sysinfo.ps1
Set-ExecutionPolicy $current_execution_policy CurrentUser

Command Switches

The following can be selected at run-time.

  • -write_output

    • This outputs the system information to a text file. The default location is the users desktop.
  • -file_location

    • This switch allows the user to set the path of the text file containing the results.
  • -file_path

    • This is the path used for the system information text file.

Dependencies

.ps1 File

Powershell Version 5.1 or higher.

.bat File

Uses echo and wmic.

sysinfo.ps1

This is now the recommended file to use.

It will require the ability to run Powershell Scripts which is restricted by default.

Dev Notes

Going forward branch master will be write protected. Please do all further work on branches off of master.

I will be starting to work on rewriting the main script in C#. This will afford the following advangages:

  • An executable. This will have the advange of not having to mess with the Powershell ExecutionPolicy everytime you want to run the scritp.

  • The Autorun in the USB_Run.zip file will actually be able to launch the script.

  • With it being writin in C# it should be more extensable and somewhat easier to manintain.

Description
Get basic system information from a script.
Readme 496 KiB
1.05.05.2021 Latest
2021-05-05 17:56:14 -04:00
Languages
PowerShell 87.7%
Batchfile 12.3%