ComObjects PsSession

Welcome Forums General PowerShell Q&A ComObjects PsSession

This topic contains 2 replies, has 2 voices, and was last updated by

3 years, 8 months ago.

  • Author
  • #25454

    Points: 0
    Rank: Member


    I have script that opens two word documents do some manipulations and saves a third document.

    The script works perfectly if executed locally. What I'm trying to do is to use the same script remotely. So I create my session and do an invoke-command with all my code and it crahses.

    Actually it can't even create the comobject!

    Faulty line $Word = New-Object -ComObject Word.Application.

    I can't explain to myself why it doesn't work in a remote session: I'm connecting to the same computer with the same credentials.

    I get weird errors like 0x80010105 (RPC_E_SERVERFAULT)
    0x80080005 (CO_E_SERVER_EXEC_FAILURE)

    Any body have an idea why it doesn't is there something I should specific to a remote session.

  • #25457

    Points: 1,785
    Helping HandTeam Member
    Rank: Community Hero

    Those COM objects require a user profile. Remoting doesn't create one, so they tend to fail.

  • #25560

    Points: 0
    Rank: Member

    Thank you

The topic ‘ComObjects PsSession’ is closed to new replies.