I need to be able to start/stop MongoDB on the cli. It is quite simple to start:
./mongod
But to stop mongo DB, I need to run open m
In PowerShell, it's: Stop-Service MongoDB
Stop-Service MongoDB
Then to start it again: Start-Service MongoDB
Start-Service MongoDB
To verify whether it's started, run: net start | findstr MongoDB.
net start | findstr MongoDB
Note: Above assumes MongoDB is registered as a service.