Problem with generating screenshots with powershell and vlc

Hi Guys

I’m having a hard time using VLC with powershell and hoping someone can help me.
I’m using powershell 5.1 on a windows 2016 Server with recent updates.

I have a script that generates screenshots from some rtsp stream.
Unfortunately it’s very unstable. Sometimes it works fine and couple minutes later it can’t generate the screenshots. There’s no error, it just seems like VLC can’t open the rtsp stream and therefore don’t generate any png files.

This is the part of my powershell script with the problem:

Start-Process "C:\program files\videolan\vlc\vlc.exe" "rtsp://link -V dummy --intf=dummy --dummy-quiet --video-filter-screne --no-audio --scene-format=png --scene-ratio=25 --scene-prefix=Screenshot --scene-path=C:\test\ --run-time=10 vlc://quit" -Wait

Strangely enough, when im using a batch script for generating the screenshots it “always” works.
This is how my batch-script looks like:

cd C:\program files\videolan\vlc
vlc rtsp://link -V dummy --intf=dummy --dummy-quiet --video-filter-screne --no-audio --scene-format=png --scene-ratio=25 --scene-prefix=Screenshot --scene-path=C:\test\ --run-time=10 vlc://quit

Does someone have any helpful hints, how I can make this work in powershell?