Run PowerShell Script activity reports error RRS feed

  • Question

  • Hello everybody!

    I wrote a simple script removing user's photo in Exchange and run it from WAL Run PowerShell script activity.

    Here is the script:

    Param (
      [Parameter(Mandatory = $True, Position=1)] [string]$Login

    $ConnectionUri = 'http://exch/PowerShell/'

    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri $ConnectionUri -Authentication Kerberos
    Import-PSSession -Session $Session -CommandName 'Remove-UserPhoto' | Out-Null
    Remove-UserPhoto $Login -Confirm:$False
    Remove-PSSession $Session

    Script works fine but I see strange error events in WAL event log:

    WAL (2.16.0305.0): 11/22/2016 12:48:38.6725: RunPowerShellScript : RunScript: PowerShell script execution resulted in 0 error(s):\n
    Extended Properties:
    WorkflowInstanceId: a72335c6-21d8-4b3c-a0dd-aa5a99174433
    TargetId: 9fd1ba09-4866-4e2d-be3e-bb191105a1b5
    RequestId: 43bdb289-200e-4b97-bc88-2cb1154caf21
    WorkflowDefinitionId: e679cccd-1504-4b79-b192-9ce5445701c0
    ActorId: e05d1f1b-3d5e-4014-baa6-94dee7d68c89

    It is confusing. Error without errors?

    Could someone explain this behavior? How can I avoid this events?

    Best regards, Yury.

    Tuesday, November 22, 2016 10:25 AM


All replies