# Issue with Snapshot action

**URL:** <https://kopia.discourse.group/t/issue-with-snapshot-action/3229>\
**Category:** General Topics\
**Created:** [August 29, 2024, 9:11pm UTC](https://kopia.discourse.group/t/issue-with-snapshot-action/3229 "2024-08-29T21:11:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eumskickin](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/eumskickin/32/1205_2.png) [@eumskickin](https://kopia.discourse.group/u/eumskickin)\
**Post date:** [August 29, 2024, 9:11pm UTC](https://kopia.discourse.group/t/issue-with-snapshot-action/3229/1 "2024-08-29T21:11:06Z")

</div>

Hi,

I have a powershell script that looks to see if outlook is running and if so sleeps for 100 s. Script runs fine in vstudio.  
When I run a scheduled or manual snapshot I’m getting “exit status 1.”  
I have the before snapshot action defined as “powershell -WindowStyle Hidden -File C:\ZZ\_Policy\Close\_OutLook\_Sleep\_2\_Min.ps1” but the JSON rep has double \ ?

Not sure what’s causing this, any help would be appreciated.

```
"actions": {
    "beforeSnapshotRoot": {
        "path": "powershell",
        "args": [
            "-WindowStyle",
            "Hidden",
            "-file",
            "C:\\ZZ_Policy\\Close_OutLook_Sleep_2_Min.ps1"
        ],
        "timeout": 120,
        "mode": "essential"

```
