I am trying to run my own PowerShell scripts in replit interface. What do I need to do t get this running. Every time I run my script it says the file main.ps1 is missing. I have created a new file called main.ps1 and copied my PowerShell code to that file and run it. It still comes back saying main.ps1 is missing. Any suggestion is highly appreciated.
By curiosity, did you use the Powershell Template? It is much easier to set up a blank Repl. First, create a blank Repl, then install “pash”, and finally run your Powershell script through
After installing, the file should run.
Also, by configuring the .replit run command, you can simply use the run button like so:
Hope this solves your problem.
Thank you @bobbypac for the quick response. I used the Powershell template. The background is I am trying to manage O365 and Azure via the PowerShell template inside Replit. Taking your suggesstion I have got around to running main.ps1 from Nix. However how do I get around installing powershell modules for azure and O365 in order run my scripts to connect to a tenant and manage it. Is that possible ?
It would be the same as if you would be doing it in a normal linux command line, so maybe do some research on that.
Hi, sorry for the late response.
I’d assume you’d install it the same way you did before, or do some research like @MiloCat suggested.