Using the Excel.Application com object in Powershell won't save a file through the task scheduler for automation.
It's likely a DCOM permissions issue. Automating Excel is sometimes fraught with peril...
The only way I've found around issues such as this is to set Excel to run as a specific user through DCOM permissions.
Open Component Services (Start > Run, type in dcomcnfg)
If you're using 32bit Excel do this instead from a command prompt:
C:\WINDOWS\SysWOW64>mmc comexp.msc /32
Drill down to Component Services > Computers > My Computer > DCOM Config
Right-click on Microsoft Excel Application and choose Properties
In the Identity tab select This User and enter the user that is running the task in task scheduler
Have you ever wondered what life might be like if the Windows 10 OS somehow had a single folder that… Read More
There could be any number of reasons for needing to flash manufacturer stock OEM firmware on a Samsung Galaxy S9… Read More
Designing e-mail solutions on a large scale can be a complex and costly challenge for a business: you need to… Read More