Hello All,
I need some help. I am trying to create a script that will dynamically read all attached USB drives and then allow me to write a common file to each USB drive attached to the pc.
I have figured out how dynamically enumerate through the drives attached to the machine but I have no way to reuse the gathered information in a loop of some sort that will enable me to write the common file to each drive name that I have collected.
My code to do the dynamic enumeration is below - can anyone point me in the right direction?
Get-PSDrive -PSProvider FileSystem | select-object Name | where {$_.Name -ne "C" -AND $_.Name -ne "D"}
Thanks,
SNAM