I'm stuck in something that I know is really simple, but do not understand this for my life is coming.
I am trying to import a .txt file with a list of hostnames, which once recovered, the script has installed a total fee memory memory.
I still have this: Select However, it only gives: Any ideas? Thank you You get the current hostname ($ box) without the computername parameter, its Without you getting the price from your computer. Get the Another way, more small, the contents of the file must be passed in the ComputerName parameter. The computer name accepts a collection of parameter names: function {$ box = get-content C: \ temp \ hostnamesforRAM.txt foreach ($ box $ in box) { Get-WmiObject Win32_ComputerSystem |
4151570432 4151570432 4151570432 4151570432 4151570432
function {$ boxes = get-content C: \ temp \ hostnamesforRAM.txt foreach ($ box $ in box) {Get-WmiObject Win32_ComputerSystem -ComputerName $ box | Select total physical memory}}
Get-WmiObject Win32_ComputerSystem-ComputerName (Get-content C: \ Temp \ hostnamesforRAM.txt) | Selection object name, total physical memory
Comments
Post a Comment