Script can be run from CAS server.
Add your CAS Servername and CAS site code to the script.
An HTML file will be generated on your desktop which shows you the log file path and link to directly open the log file from the machine from where you are running the script.
Powershell remoting should be enabled on all servers.
The output would be similar to the below screenshot.