Powershell cannot create Outlook COM object from Command Prompt

前端 未结 4 1260
别跟我提以往
别跟我提以往 2021-01-18 22:39

I have a script used to send mails via Microsoft Outlook from command prompt. This works fine if I run it from inside PowerShell or ISE console. But when I tried to execute

4条回答
  •  春和景丽
    2021-01-18 23:26

    I had the same issue, I figured out it was a combination of 3 things.

    1. Running with the correct privilege level (admin)
    2. Using the same arch (32-bit vs 64-bit) for outlook and powershell
    3. Closing Outlook, since the script will open it.

提交回复
热议问题