Below is my Powershell script to delete certain backup files on my servers and then display their contents. There is a lot of repetition. Is there a more efficient way of performing this task?
Remove-Item \\ietg\z$\Backups\daily\ETG*.bkf -Force -Confirm
Remove-Item \\icnt\Z$\Backups\Daily\cnt*.bkf -Force -Confirm
Remove-Item \\igre\Z$\Backups\Daily\gre*.bkf -Force -Confirm
Remove-Item \\ihvd\Z$\Backups\Daily\hvd*.bkf -Force -Confirm
Remove-Item \\iklr\Z$\Backups\Daily\klr*.bkf -Force -Confirm
Get-ChildItem \\ietg\z$\Backups\daily\
Get-ChildItem \\icnt\Z$\Backups\Daily\
Get-ChildItem \\igre\Z$\Backups\Daily\
Get-ChildItem \\ivd\Z$\Backups\Daily\
Get-ChildItem \\iklr\Z$\Backups\Daily\