When you post code, error messages, sample data or console output format it as code, please.
In the “Text” view you can use the code tags “CODE”, in the “Visual” view you can use the format template “Preformatted”. You can go back edit your post and fix the formatting - you don’t have to create a new one.
Thanks in advance.
You should not use Get-WMIObject anymore. User Get-CimInstance instead. And you don’t need a loop. Get-CimInstance is able to take an array of computer names.
thx for the code. I edited my post.
Unfortunately i get an Error
Missing Argument for the Parameter “ClassName”
I tryed to change add the classname CIM_LogicalDisk but then i get an error “Get-CimInstance : The WS-Management service cannot process the request. The WQL query is invalid.”