To run this with out reading a list just remove the commands at the the bottom and replace the “$_” with computer name or replace the $file variable with local path. Admin rights on the remote computers will be needed and proper permission to access and delete the files. Computers.txt should have only one computer name perline.
123456789101112131415#MAIN
function delete-remotefile {
PROCESS {
$file = "\\$_\c$\File_to_be_deleted.txt"...


Posted in
Tags: