Private/Read-NSPConditionalAccessText.ps1
|
function Read-NSPConditionalAccessText { <# .SYNOPSIS Reads one line of operator text for the dashboard; blank returns -Default. Wrapped so tests can script answers. #> [CmdletBinding()] [OutputType([string])] param( [Parameter(Mandatory)][string]$Prompt, [string]$Default ) $suffix = if ($Default) { " [$Default]" } else { '' } $answer = Read-Host ($Prompt + $suffix) if ([string]::IsNullOrWhiteSpace($answer)) { $Default } else { $answer.Trim() } } |