Можно ли отправить текст в текущую строку приглашения? Примерно так:
PS[10]> Get-Location c:/ PS[11]> Write-PromptLine "This text has been written by Powershell" PS[12]> This text has been written by Powershell| # | denotes the caret
Вы можете использовать метод SendKeys.SendWait :
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") [System.Windows.Forms.SendKeys]::SendWait("This text has been written by Powershell")