VMware Cloud Community
philk33
Enthusiast
Enthusiast

Where do I put -ErrorAction SilentlyContinue in my invoke external script?

Do you simply add an arguments string with that action preference?

pastedImage_0.png

I'm pretty new to this so I would think that is what you do, but need to confirm.

Reply
0 Kudos
3 Replies
Nvoisin
Contributor
Contributor

No, you must write '-ErrorA.....' in your script.

Reply
0 Kudos
philk33
Enthusiast
Enthusiast

If I invoke one powershell script with another powershell script, I can definitely write that into the invoke line at the end and it should suppress noisy errors.

Something like:

"path to script" -ErrorAction SilentlyContinue

I just thought that the invoke external script could accommodate that. Basically I've been having problems running my master script on my powershell host so I was trying to run each script individually in it's own action with that suppress line.

Reply
0 Kudos
Nvoisin
Contributor
Contributor

No, "path to script" -ErrorAction SilentlyContinue can't work...

Reply
0 Kudos