[英]How would I convert multiple strings to an IP address in Powershell so I can filter out IPv6
[英]How can i filter out information in powershell?
Windows 10 64 位。 PowerShell 5.
如何在一台計算機上使用 PowerShell 查找“總物理內存”。 替換computername
名。
systeminfo -s computername | Select-String 'Total Physical Memory:').ToString().Split(':')[1].Trim()
我無法對此進行測試:
對於許多計算機,如何使用 PowerShell function 查找“總物理內存”。
Get-SystemInfo -ComputerName server01,server02
您可以在gallery.technet.microsoft.com獲取get-systeminfo
。
正如@Lee_Daily 所建議的,使用 Powershell 會更容易、更直接。
這將產生以 GiB 為單位的物理 memory 數量。
(Get-CimInstance -ClassName CIM_PhysicalMemory | Measure-Object -Sum Capacity).Sum / 1GB
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.