List TM1 log files of several servers

Product:
Planning Analytics 2.0.5
Microsoft Windows 2016 Server

Problem:
I want a list of all TM1SERVER.LOG files on the servers D drive, to find what TM1 instances applications logs I should inspect with my log file monitor software.

Suggested Solution:
On one of the servers, log in as a local administrator, that also areĀ  admin on all the other servers.
Create a text file with the names of the servers.
Enter one server name per row, like this
servernameA
servernameB
servernameC
Save the file as tmservers.txt

Create a CMD file with this content:
for /F %%a in (tmservers.txt) do (
net use z: \\%%a\d$
z:
cd \
dir /s /b tm1server.log > d:\temp\%%a.txt
c:
net use z: /d
)
Save the file as tm1list.cmd

Go to a DOS prompt as administrator and run above file.

tm1list.cmd
It will create a file for each server in the d:\temp folder on the server where you run the cmd file.
Each file will have the servername as filename, in the file will be a list looking something like this;

Z:\data\tm1\servers\appone\logfiles\tm1server.log
Z:\data\tm1\servers\appnametwo\logfiles\tm1server.log
Z:\data\tm1\servers\tm1appnametree\Logfiles\tm1server.log

Z is the D drive on the server.

The path is different, depends on where you store the TM1 instances.

More information
https://stackoverflow.com/questions/15486011/batch-file-for-loop-via-a-text-file-of-ip-addresses-not-working

https://ss64.com/nt/dir.html