0

I've a script that needs user inputs, and also let them check all the data being displayed, while script is running, and in the end, save/print all the content, to a file, through powershell commands.

I know that there is a way through, GUI selecting all and copy to a text editor, but this is not feasible in this case.

Anyone knows how to achieve this?

2

1 Answer 1

0

Solve this with:

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.host/start-transcript?view=powershell-7.3

and,

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.host/stop-transcript?view=powershell-7.3

The code that it needs to be recorded, just need to be between each of these commands.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.