Building custom solutions that extend, automate, and integrate Microsoft 365 apps.
Just to clarify the process and the current issue.
Our automated process does an ssh to the windows server and then runs a powershell script with parameters sent. This powershell script opens a excel file, refreshes the pivot data and then save a copy of the sheet. The windows server has an open session always with the ssh user logged in.
Now the automated process is failing but if I RDP to the windows server and run the powershell script in a powershell cli then the script succeeds. After this when I run the automated process again for the same excel file the process runs fine. But if I try to run the automated process for a different excel sheet I see the failure again. I have to run the process manually on an RDP session for each excel file and then run the automated process again for the same excel file consecutively for it to complete successfully.
We applied windows patches and did office update before this issue started happening.