Here we will discuss about reading multi line inputs from command line using PowerShell. In some time we often get requirement to enter multiple lines or paragraphs of text as input to a PowerShell script, so we are going to discuss in this article.

Here logic is very simple, the Get-MultiLineInput function will repeatedly call Read-Host till the value entered by the user with โ€œexitโ€. If user enter with โ€œexitโ€ then immediately it will stopping the loop.

OUTPUT: