SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

PowerShell – System Information

Different ways to find system information are given below:-

  • Method 1:Querying WMI objects
    • Download the code SystemInfo
    • Create the function with Powershell console and call the function with ComputerName as its argument
Get Complete details of any server Local or remote 
This function uses WMI class to connect to remote machine and get all related details 
Just Pass computer name as Its parameter 
Get-SystemInfo -ComputerName HQSPDBSP01 
To get help: 
Get-Help Get-SystemInfo 


Function Call: 
PS:\>Get-SystemInfo -ComputerName <computername>
 Method 2:- Reference from Powershell Tip
  • Use of systeminfo.exe with Powershell. Copy and Paste the below code and call the function
function Get-SystemInfo 
  param($ComputerName = $env:ComputerName) 

      $header = 'Hostname','OSName','OSVersion','OSManufacturer','OSConfig','Buildtype', 'RegisteredOwner','RegisteredOrganization','ProductID','InstallDate', 'StartTime','Manufacturer','Model','Type','Processor','BIOSVersion', 'WindowsFolder' ,'SystemFolder','StartDevice','Culture', 'UICulture', 'TimeZone','PhysicalMemory', 'AvailablePhysicalMemory' , 'MaxVirtualMemory', 'AvailableVirtualMemory','UsedVirtualMemory','PagingFile','Domain' ,'LogonServer','Hotfix','NetworkAdapter' 
      systeminfo.exe /FO CSV /S $ComputerName |  
            Select-Object -Skip 1 |  
            ConvertFrom-CSV -Header $header 

PowerSQL By Prashanth Jayaram

Technology enthusiast with 7+ years of experience in Database Technology. I am Microsoft Certified Professional with certificates of OCA, MCP, MCTS, MCITP developer, MCITP administration and backed with a degree in Master of Computer Application. My expertise lies in T-SQL programming, Replication, PowerShell and Performance Tuning. Hobbies are Drawing, playing soccer and listening to Melodies songs.


Leave a comment on the original post [sqlpowershell.wordpress.com, opens in a new window]

Loading comments...