top of page

PowerShell script to collect info from user interface

PowerShell's Read-Host command can help you collect information from a user input. This simple script:


#region Read-Host

$CaseIndex = Read-Host -Prompt 'What is the case index number?'

$CaseIndex


. . . will collect the information for the value $CaseIndex. Press the play button on the upper toolbar to run the script. The question listed after '-Prompt' will be presented to the user, and the answer will be saved as $CaseIndex. When $CaseIndex is entered in PowerShell again, the user entered value will be given.







Commentaires


bottom of page