How copy files to several servers

Product:
Planning Analytics 2.0.9.10
Microsoft Windows 2016 server

Issue:
I have several Cognos BI servers, where i need to update the planning.html file on, to make SSO work for TM1.

Solution:

On your source TM1 server, create a folder c:\script\tm1.

Create a text file serverslist.txt, where you enter the name or IP address of the servers.

Copy the updated planning.html, pmhub.html and tm1web.html files to this folder.

Create a powershell file, copyfiles.ps1, with this content:

# run the script on the source machine
# remote machines list 
$machines= Get-Content -Path "c:\Script\tm1\serverslist.txt" 
foreach ($onemachine in $machines) 
{ 
Write-Host "Currently the script is copying files on" $onemachine 
Copy-Item -Path "c:\Script\tm1\planning.html" -Destination "\\$onemachine\c$\Program Files\ibm\cognos\analytics\webcontent" -Recurse
Copy-Item -Path "c:\Script\tm1\planning.html" -Destination "\\$onemachine\c$\Program Files\ibm\cognos\analytics\webcontent\bi" -Recurse
Copy-Item -Path "c:\Script\tm1\pmhub.html" -Destination "\\$onemachine\c$\Program Files\ibm\cognos\analytics\webcontent" -Recurse
Copy-Item -Path "c:\Script\tm1\pmhub.html" -Destination "\\$onemachine\c$\Program Files\ibm\cognos\analytics\webcontent\bi" -Recurse
Copy-Item -Path "c:\Script\tm1\tm1web.html" -Destination "\\$onemachine\c$\Program Files\ibm\cognos\analytics\webcontent\tm1\web" -Recurse
Copy-Item -Path "c:\Script\tm1\tm1web.html" -Destination "\\$onemachine\c$\Program Files\ibm\cognos\analytics\webcontent\bi\tm1\web" -Recurse
}

Ensure that the paths are correct for your servers, if you have installed to D: drive you need to update the powershell script to reflect this; “\\$onemachine\d$\Program Files\ibm\cognos\analytics\webcontent\bi\tm1\web”

Start a powershell window as administrator.

The person logged in must have local admin rights on all cognos servers for this to work.

When you run the script it will print out any errors, like above when it can not find the server.

Test the script first in you LAB environment, as it will overwrite any existing files on the CA11 servers.

More Information:

https://www.heelpbook.net/2020/copy-file-to-remote-servers-powershell

Powershell Copy Files | Single | Multiple Computers

https://docs.microsoft.com/en-us/answers/questions/337705/copy-file-to-multiple-remote-computers.html

https://exploringtm1.com/install-planning-analytics-workspace-to-windows-2016/

https://exploringtm1.com/how-to-upgrade-install-planning-analytics-for-excel-pax/

https://exploringtm1.com/how-to-upgrade-planning-analytics-tm1/