Skip to main content

Get-FluenceInput

SYNOPSIS​

Shows a themed Fluent input dialog and returns the captured value, or $null on cancel.

SYNTAX​

Get-FluenceInput [-Message] <string> [-Title <string>] [-TitleBarIcon <string>]
[-DefaultValue <Object>] [-AsPlainText] [-InputType <string>] [-ValidateSet <string[]>]
[-As <string>] [-Timeout <int>] [-Countdown] [-Theme <string>] [-Backdrop <string>]

DESCRIPTION​

Wraps a single-prompt Show-FluenceDialog with an OK (default) and Cancel button. Returns the captured input value when the user clicks OK, or $null when the user cancels or the dialog times out. Password input returns SecureString unless -AsPlainText is specified. Dispose the returned SecureString when the caller no longer needs it.

EXAMPLES​

EXAMPLE 1​

$name = Get-FluenceInput -Message 'Enter your name'

EXAMPLE 2​

$age = Get-FluenceInput -Message 'Enter your age' -InputType Number -DefaultValue 25

EXAMPLE 3​

$edition = Get-FluenceInput -Message 'Edition' -InputType Choice -ValidateSet 'Standard', 'Pro' -As Radio

EXAMPLE 4​

$server = Get-FluenceInput -Message 'Server name' -DefaultValue 'localhost' -Timeout 20 -Countdown
if ($null -eq $server) { $server = 'localhost' }

Falls back to the default after twenty unattended seconds.

PARAMETERS​

-As​

How a Choice prompt renders its values: Combo (default) or Radio.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-AsPlainText​

Password prompts only. Return a plain string instead of the default SecureString. Assign an explicitly requested plaintext value to a variable to avoid printing it. The DialogResult default formatting does not apply to this raw string.

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Backdrop​

Mica, Acrylic, Tabbed, None, or Auto. Omit it to keep the backdrop already applied to the process; the first Fluence call in a process applies Mica.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Countdown​

Show the remaining seconds in the OK button's caption. Requires -Timeout.

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-DefaultValue​

The initial value pre-filled in the input control. Password defaults must be strings and remain plaintext in the specification; omit the default when collecting a secret.

Type: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-InputType​

The input control type. One of: Text (default), Multiline, Password, Number, Checkbox, Toggle, Choice, Date, Time, FileOpen, FileSave, FolderOpen, Link. A List prompt is not offered here because it picks from a set rather than capturing a typed value; use Show-FluenceListSelection for that.

Type: System.String
DefaultValue: Text
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Message​

The prompt label shown in the dialog (Mandatory).

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Theme​

Auto, Light, Dark, or HighContrast. Omit it to keep the theme already applied to the process; the first Fluence call in a process applies Auto.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Timeout​

Seconds after which the dialog closes on its own and $null is returned. Between 1 and 86400.

Type: System.Int32
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Title​

The window title. -TitleBarText is an alias.

Type: System.String
DefaultValue: Fluence
SupportsWildcards: false
Aliases:
- TitleBarText
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-TitleBarIcon​

Title bar icon from a local file path, file: URI, or pack: URI. Other schemes and missing local files are rejected before UI dispatch. This does not change a message severity icon.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ValidateSet​

The allowed values for a Choice prompt. Required when -InputType is Choice.

Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters​

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS​

OUTPUTS​

System.Object​

NOTES​

Uses the calling STA thread or a module-owned STA runspace. An existing host application is supported only when the command already runs on its dispatcher thread. Blocks until the dialog closes.