PoshCode Archive  Artifact [d6b17d7183]

Artifact d6b17d7183add670e76d6be06988c2517914c2a3b0aedc9f268dcc85a2df6149:

  • File Get-HarddriveModel.ps1 — part of check-in [30f60b8586] at 2018-06-10 13:52:59 on branch trunk — Retrieves harddrive model name without WMI (user: greg zakharov size: 594)

# encoding: ascii
# api: powershell
# title: Get-HarddriveModel
# description: Retrieves harddrive model name without WMI
# version: 0.1
# type: function
# author: greg zakharov
# license: CC0
# function: Get-HarddriveModel
# x-poshcode-id: 5285
# x-archived: 2014-07-08T16:21:31
# x-published: 2014-07-05T13:30:00
#
#
function Get-HarddriveModel {
  <#
    .NOTES
        Author: greg zakharov
  #>
  (gp (
      Join-Path $key (
        'Enum\' + (gp (Join-Path ($key = 'HKLM:\SYSTEM\CurrentControlSet') 'Services\Disk\Enum')).('0')
      )
    )
  ).FriendlyName
}