Search code examples
c#powershellpowershell-cmdlet

C# PowerShell Cmdlet input prompt


Could anyone please provide a C# code sample showing how to prompt for user input in a custom PowerShell Cmdlet?

I find plenty of articles on how to pass parameters to a Cmdlet, but little to none on how to prompt for user input during runtime.

Thank you!


Solution

  • I would start here: MSDN ReadHostCommand Documentation