PwSh.Fw.Computer
1.1.0-pre61
This module is a part of PwSh.Fw framework. It handles fetching local computer hardware.
Installation Options
Owners
Copyright
(c) 2020-2026 Charles-Antoine Degennes. All rights reserved.
Package Details
Author(s)
- Charles-Antoine Degennes
Tags
Windows Linux MacOS PwSh.Fw computer
Functions
Get-Computer Get-EthernetObject Load-ComputerDictionaries Load-ComputerLibraries New-ComputerObject New-HashtableFromCommand
PSEditions
Dependencies
Release Notes
## [unreleased]
### Added
- Hardware inventory getters : `$computer.uuid` (SMBIOS product UUID), `$computer.cpu` (model, core counts), `$computer.memory` (total RAM in bytes), `$computer.uptime` (seconds since boot)
- `Get-ComputerTpm` : TPM informations exposed as `$computer.tpm` (version, vendor, firmware version, ready state, supported hash algorithms)
- `Get-ComputerTpm` (Windows) : direct TPM 2.0 fallback through the TBS API (`tbs.dll`) when WMI reports no chip (LTSC images without `tpmcore.dll` / `Tpmsvc`) — manufacturer, vendor strings, firmware version and hash algorithms read via `TPM2_GetCapability`
- `Get-ComputerTpm` (Windows) : last-resort PnP stage (`Win32_PnPEntity`, `Service = 'TPM'`), presence only
- `source` property on the TPM object : filling stage (`wmi` / `direct` / `pnp` on Windows, `sysfs` on Linux)
- Pester tests for the Windows TPM response parsers (`tests/Computer.Dict.Windows.Tests.ps1`)
- Normalized cross-platform disk/partition objects on `$computer.disks` / `$computer.partitions` : canonical properties (`name`, `model`, `size` in bytes, `uuid`, `fileSystem`, `mountpoint(s)`, `bootable`, …) returning the same value type on any OS
- Raw OS data (CIM instances, `lsblk` entries) preserved in each object's `raw` property
- Pure mapping helpers `ConvertTo-ComputerDisk` / `ConvertTo-ComputerPartition` in the Linux and Windows dictionaries
### Changed
- `Get-ComputerDisk` / `Get-ComputerDiskPartition` return the normalized objects (Linux uses `lsblk -b`, numeric byte sizes)
- `Mount-ComputerDiskPartition` / `DisMount-ComputerDiskPartition` use the canonical partition properties
### Deprecated
### Removed
### Fixed
- Release script : zip asset link without `direct_asset_path`
- `Get-ComputerUptime` (Windows) returned 0 : `LastBootUpTime` already comes back as a local `[datetime]` from `Get-CimInstance` ; both shapes (`[datetime]` and raw DMTF string) now handled
- (Linux) leading `$null` entry for disks without partition
- (Windows) partitions without `Guid` no longer get a fabricated random GUID ; `uuid` left empty
- (Windows) DISKPART parameter set referenced undefined variables (`$Disk` / `$PartNum`)
- (Linux) DISKPART parameter set referenced `$PartNumber` instead of `$PartNum`
- (Windows) broken under PwSh.Fw.Core 2.x : raw hashtable now built by direct `PSObject.Properties` enumeration, independent of `ConvertTo-Hashtable` / `Merge-Hashtables`
- `scripts/02_pester.ps1` did not fail the job on test failure : result captured via `Run.PassThru`, non-zero exit on red suite
### Security
Note: the direct TBS stage requires `PwSh.Fw.OS >= 1.6.0` (`Load-OSDictionaries`), to be declared in `RequiredModules` before publication.
FileList
- PwSh.Fw.Computer.nuspec
- Dictionaries\Computer.Dict.OS\Computer.Dict.OS.psd1
- PwSh.Fw.Computer.psd1
- Dictionaries\Computer.Dict.OS\Computer.Dict.OS.psm1
- PwSh.Fw.Computer.psm1
- Dictionaries\Computer.Dict.Windows\Computer.Dict.Windows.psd1
- Dictionaries\Computer.Dict.Linux\Computer.Dict.Linux.psd1
- Dictionaries\Computer.Dict.Windows\Computer.Dict.Windows.psm1
- Dictionaries\Computer.Dict.Linux\Computer.Dict.Linux.psm1
Version History
| Version | Downloads | Last updated |
|---|---|---|
| 1.1.0-pre61 (current version) | 12 | 12/1/2026 |
| 1.0.0 | 71 | 10/18/2026 |
| 1.0.0-pre57 | 7 | 11/27/2026 |
| 1.0.0-pre56 | 7 | 11/27/2026 |
| 1.0.0-pre55 | 7 | 11/27/2026 |
| 1.0.0-pre52 | 7 | 11/26/2026 |
| 1.0.0-pre51 | 6 | 11/26/2026 |
| 1.0.0-pre50 | 7 | 11/26/2026 |
| 1.0.0-pre43 | 6 | 10/18/2026 |
| 1.0.0-pre41 | 5 | 10/16/2026 |
| 1.0.0-pre40 | 5 | 10/15/2026 |
| 1.0.0-pre35 | 155 | 12/14/2025 |
| 1.0.0-pre33 | 198 | 11/14/2024 |
| 1.0.0-pre32 | 5 | 11/14/2024 |
| 1.0.0-pre31 | 6 | 11/13/2024 |
| 1.0.0-pre30 | 5 | 11/13/2024 |
| 1.0.0-pre29 | 7 | 11/13/2024 |
| 1.0.0-pre28 | 29 | 10/20/2024 |
| 1.0.0-pre26 | 6 | 10/19/2024 |
| 1.0.0-pre25 | 33 | 9/27/2024 |
| 1.0.0-pre24 | 9 | 9/27/2024 |
| 1.0.0-pre23 | 6 | 9/27/2024 |
| 1.0.0-pre22 | 8 | 9/27/2024 |
| 1.0.0-pre21 | 7 | 9/20/2024 |
| 1.0.0-pre20 | 7 | 9/20/2024 |
| 1.0.0-pre19 | 7 | 9/20/2024 |
| 1.0.0-pre18 | 8 | 9/19/2024 |
| 1.0.0-pre17 | 14 | 7/26/2024 |
| 1.0.0-pre16 | 5 | 7/26/2024 |
| 1.0.0-pre15 | 6 | 7/25/2024 |
| 1.0.0-pre13 | 112 | 4/17/2024 |
| 1.0.0-pre11 | 20 | 10/6/2023 |
| 1.0.0-pre10 | 9 | 10/4/2023 |
| 1.0.0-pre09 | 9 | 10/2/2023 |
| 1.0.0-pre08 | 9 | 9/29/2023 |
| 1.0.0-pre07 | 9 | 9/29/2023 |
| 1.0.0-pre06 | 10 | 7/28/2023 |
| 1.0.0-pre05 | 8 | 7/28/2023 |
| 1.0.0-pre04 | 8 | 7/28/2023 |
| 1.0.0-pre03 | 8 | 7/28/2023 |