I have a batch file to run a powershell program. When I double click the batch file, it runs the powershell code to
I had a similar problem trying to schedule a script that automates Microsoft Word. In my case, I was eventually able to work around it by setting the DCOM Identity.
dcomcnfg
mmc comexp.msc /32
Component Services
> Computers
> My Computer
> DCOM Config
Microsoft Excel Application
Properties
, Identity
tab.This user
and put in the same credentials you put in for the scheduled task.