标签:powershell
群里一个小兄弟的提问
用PowerShell来写比c#要简单太多了,WMI直接提供了方法,调用即可。
#made by kukisama $a=(get-wmiobject -class Win32_PhysicalMemory -namespace "root\cimv2").Capacity $b=(get-wmiobject -class Win32_PerfFormattedData_PerfOS_Memory -namespace "root\cimv2").AvailableMBytes $c=$a/1024/1024 $d=$c-$b cls echo 您当前总内存$c 可用内存$b 已用内存$d
本文出自 “九叔-微软私有云” 博客,请务必保留此出处http://jiushu.blog.51cto.com/972756/1670635
标签:powershell
原文地址:http://jiushu.blog.51cto.com/972756/1670635