Hi All,
We have a requirement in batch scripts.
We have 5 windows servers
server1
server2
server3
server4
server5
in all 5 servers we have D:\BACKUPLOG folder.
if i execute batch script from server1 it should delete all files under (D:\BACKUPLOG) in all servers.
how do we achieve it . Script needs be executed in Server1 only.
We will be scheduling it daily from task scheduler.
Thanks in advance,
One Server to multiple servers
Moderator: DosItHelp
Re: One Server to multiple servers
Easiest solution would be to use the UNC path with the administrative share to each server.
Make sure you assign a username and password to the Windows Scheduled task and that user must have the correct permissions as well. That user must have the correct permissions to all 5 servers.
Code: Select all
del \\server1\D$\BACKUPLOG\*.*
del \\server2\D$\BACKUPLOG\*.*
etc....
Make sure you assign a username and password to the Windows Scheduled task and that user must have the correct permissions as well. That user must have the correct permissions to all 5 servers.