0

I research a lot in last couple days and I found only solutions for execute powershell scripts but I did't find how to create .ps1 file.

I have web app (ASP.NET) and I need to dynamically create/save script without running.

If anyone have some direction please tell me

note. Version of powershell is 3.0, and I included needed dll in project

1 Answer 1

2

A PowerShell script is nothing more than a text file with a .ps1 extension. Just use StreamWriter to create the file with the commands you want and save with the .ps1 extension.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.