PowerShell 獲取系統(tǒng)信息的函數(shù)
function Get-SystemInfo
{
param($ComputerName = $env:COMPUTERNAME)
$header = 'Hostname','OSName','OSVersion','OSManufacturer','OSConfiguration','OS Build Type','RegisteredOwner','RegisteredOrganization','Product ID','Original Install Date','System Boot Time','System Manufacturer','System Model','System Type','Processor(s)','BIOS Version','Windows Directory','System Directory','Boot Device','System Locale','Input Locale','Time Zone','Total Physical Memory','Available Physical Memory','Virtual Memory: Max Size','Virtual Memory: Available','Virtual Memory: In Use','Page File Location(s)','Domain','Logon Server','Hotfix(s)','Network Card(s)'
systeminfo.exe /FO CSV /S $ComputerName |
Select-Object -Skip 1 |
ConvertFrom-CSV -Header $header
}
運行結(jié)果:
![]() |
![]() |
相關(guān)文章
如何利用PowerShell監(jiān)控Win-Server性能詳解
這篇文章主要給大家介紹了關(guān)于如何利用PowerShell監(jiān)控Win-Server性能的相關(guān)資料,文中通過示例代碼介紹的非常詳細,對大家的學(xué)習或者工作具有一定的參考學(xué)習價值,需要的朋友們下面隨著小編來一起學(xué)習學(xué)習吧2018-10-10
PowerShell使用枚舉變量定義帶智能提示功能的函數(shù)參數(shù)
這篇文章主要介紹了PowerShell使用枚舉變量定義帶智能提示功能的函數(shù)參數(shù),但定義后只在ISE當中有效,需要的朋友可以參考下2014-07-07
Powershell實現(xiàn)從注冊表獲取用戶配置腳本分享
這篇文章主要介紹了Powershell實現(xiàn)從注冊表獲取用戶配置腳本分享,本文直接給出實現(xiàn)腳本源碼,需要的朋友可以參考下2015-03-03
PowerShell中使用GetType獲取變量數(shù)據(jù)類型
這篇文章主要介紹了PowerShell中使用GetType獲取變量數(shù)據(jù)類型,本文使用實例來說明GetType的使用方法,并對返回值作了一定的解釋,需要的朋友可以參考下2014-08-08



