I have a cmdlet under module M1. I need to run the cmdlet from commandline itself. Like say, powershell -Command cmdlet1.
But I need to import module M1 before running cmdlet1. Is there a way I can do this in one shot?
I don't want to interact with PowerShell, but I want to run cmdlet1 just like I would run a normal Windows command.