Score:0

How to save/print a powershell terminal text in the end of a script run through powershell commands?

in flag

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?

joeqwerty avatar
cv flag
Look into **Start-Transcript** - https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.host/start-transcript?view=powershell-7.3
marafado88 avatar
in flag
Thank you, I've discovered that right after asking here. Worked like a charm!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.