Display hardware information with Powershell

powershell2

The Get-Computerinfo cmdlet gathers a variety of information about the computer it is running on. In addition to information about running processes, the number of users or the currently used logon server in the active directory, there is a lot of information about the existing hardware. With these you can get a short, quick overview of the equipment of the PC or notebook.

With the following example Powershell command, you get the following information:

  1. CsManufacturer -> Computer manufacturer
  2. CsModel -> Manufacturer’s computer model
  3. CsName -> Computername
  4. CsPhyicallyInstalledMemory -> Installed memory
  5. CsProcessors -> Installed CPU
  6. CsNumberOfProcessors -> Number of CPUs
  7. CsNumberOfLogicalProcessors -> Number of logical processors
  8. WindowsInstallDateFromRegistry -> Windows installation date
  9. WindowsProductName -> Version of the installed operating system
  10. OsArchitecture -> 32bit or 64bit operating system

The command for this is:

Get-ComputerInfo | fl CsManufacturer,CsModel,CsName, `
CsPhyicallyInstalledMemory
,CsProcessors,CsNumberOfProcessors, `
CsNumberOfLogicalProcessors
,WindowsInstallDateFromRegistry, *
WindowsProductName
,
OsArchitecture



Install Azure PowerShell with MSI

AzureLogo2

To use Azure PowerShell, you need to:

  1. Update to Windows PowerShell 5.1 if needed. If you’re on Windows 10, you already have PowerShell 5.1 installed.
  2. Install .NET Framework 4.7.2 or later.

The MSI package for Azure PowerShell is available from GitHub. If you have installed earlier versions of Azure PowerShell using the MSI, the installer automatically removes them. The MSI package installs modules in:

${env:ProgramFiles}\WindowsPowerShell\Modules.

To start working with Azure PowerShell, sign in with your Azure credentials.

# Connect to Azure with an interactive dialog for sign-in
Connect-AzAccount

Note:

If you’ve disabled module autoloading, you need to manually import the module with Import-Module Az. Because of the way the module is structured, this can take up to a minute.