Hi All,
I'm trying to create a script to enumerate the logical disks of a list of servers and run a script against each drive, how is this done in powershell?
E.G.
$cim = new-cimsession -comp server1, server2, server3,server4
Get-CimInstance -ClassName Win32_LogicalDisk -filter 'DriveType=3' -CimSession $cim |
Select PSComputerName, DeviceID | Invoke-Command -ComputerName PSComputerName -FilePath "C:\admin\RunScript.ps1" -ArgumentList DeviceID
Thanks in advance.