• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 285
  • Last Modified:

Run a command line command from powershell

I need to run a powershell script that will run this:

from the C:\program files\castor software\ directory run this command: Lanlconfg  -list

Is there a way to do this?
1 Solution

Please try executing the command in the following format.

CMD.EXE /C "C:\program files\castor software\directory\Lanlconfg.exe"  -list
If you want to run it directly in PS without opening a command processor, you can use
& "C:\program files\castor software\Lanlconfg" -list

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now