[英]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.