troubleshooting Question

How to run a poweshell command from a batch file

Avatar of Attila Mosonyi
Attila Mosonyi asked on
PowershellFTPWindows OS
8 Comments2 Solutions126 ViewsLast Modified:
I would like to run a powershell command:
Get-Process "auto ftp manager" | Where StartTime -lt (Get-Date).AddMinutes(-30) | Stop-Process -Force
every 12 hours on a server automatically.
I was thinking to use a batch file and windows scheduler to run it.
How do I make the powershell command run from a batch file?
Is there a better solution to achieving this task, i.e. running the ps command automatically every 12 hours?
Join our community to see this answer!
Unlock 2 Answers and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros