25 July 2023

Rescan disks remotely for a list of computers

 Get-Content .\records.txt | %{Invoke-Command -ComputerName $PSItem -ScriptBlock {@('RESCAN','EXIT') | diskpart}}