![](/img/trans.png)
[英]How to read large file on computer with limited RAM under Windows 7? The file size is 25GB but RAM capasity is 16GB only
[英]Finding size of RAM on a remote computer
我試圖在域中的遠程計算機上查找 RAM 的大小。 這是我擁有的powershell腳本的相關部分:
Invoke-Command -ComputerName $ComputerName {Get-PSDrive -PSProvider FileSystem} |
where {$_.Free -gt 0} |
select pscomputername,Root,@{name="RAM (GB)";expression={"{0:N3}"
-f (($_.TotalPhysicalMemory)/1gb)}}
腳本執行沒有任何錯誤,但是,顯示“0.00”作為已安裝 RAM 的輸出。 這當然是不正確的,我已經嘗試在幾台遠程計算機上運行它。
由於我是 PS 的初學者,因此任何提示都將不勝感激。
你可以試試
Invoke-Command -ComputerName $ComputerName {Get-WmiObject win32_computersystem} | select @{name="RAM (GB)";e={[math]::Round($_.totalphysicalmemory/1GB,0)}}
據我所知,文件系統提供商指的是磁盤驅動器。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.