Running powershell script in commandline

Best practices, code snippets for common functionality, examples, and guidelines.
Posts: 5
Joined: Mon Feb 01, 2021 1:06 pm

Running powershell script in commandline

Post by KimVW » Thu Oct 07, 2021 1:44 pm

I might have a silly question here...

When I manually start cmd and run my powershell script to get all installed office apps then the script runs fine and my result is shown.

When I do exactly the same process via Ranorex it fails every time!

What am I missing here, what am I doing wrong?
You do not have the required permissions to view the files attached to this post.

User avatar
Ranorex Guru
Ranorex Guru
Posts: 7465
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Running powershell script in commandline

Post by odklizec » Thu Oct 07, 2021 2:06 pm


Unfortunately, it's hard to tell what's wrong, without seeing the ps1 file. Have you tried to create a batch file, which will execute the powershell commands (instead of typing the commands to cmd window)? Also, are you running the test/Ranorex Studio as admin or non-admin?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration