Show-WelcomePrompt
SYNOPSISโ
Called by Show-InstallationWelcome to prompt the user to optionally do the following:
- Close the specified running applications.
- Provide an option to defer the installation.
- Show a countdown before applications are automatically closed.
SYNTAXโ
Show-WelcomePrompt [[-ProcessDescriptions] <String>] [[-CloseAppsCountdown] <Int32>]
[[-ForceCloseAppsCountdown] <Boolean>] [[-PersistPrompt] <Boolean>] [-AllowDefer] [[-DeferTimes] <String>]
[[-DeferDeadline] <String>] [[-MinimizeWindows] <Boolean>] [[-TopMost] <Boolean>] [[-ForceCountdown] <Int32>]
[-CustomText] [<CommonParameters>]
DESCRIPTIONโ
The user is presented with a Windows Forms dialog box to close the applications themselves and continue or to have the script close the applications for them. If the -AllowDefer option is set to true, an optional "Defer" button will be shown to the user. If they select this option, the script will exit and return a 1618 code (SCCM fast retry code). The dialog box will timeout after the timeout specified in the XML configuration file (default 1 hour and 55 minutes) to prevent SCCM installations from timing out and returning a failure code to SCCM. When the dialog times out, the script will exit and return a 1618 code (SCCM fast retry code).
EXAMPLESโ
EXAMPLE 1โ
Show-WelcomePrompt -ProcessDescriptions 'Lotus Notes, Microsoft Word' -CloseAppsCountdown 600 -AllowDefer -DeferTimes 10
PARAMETERSโ
-ProcessDescriptionsโ
The descriptive names of the applications that are running and need to be closed.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-CloseAppsCountdownโ
Specify the countdown time in seconds before running applications are automatically closed when deferral is not allowed or expired.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-ForceCloseAppsCountdownโ
Specify whether to show the countdown regardless of whether deferral is allowed.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-PersistPromptโ
Specify whether to make the prompt persist in the center of the screen every couple of seconds, specified in the AppDeployToolkitConfig.xml.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-AllowDeferโ
Specify whether to provide an option to defer the installation.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-DeferTimesโ
Specify the number of times the user is allowed to defer.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DeferDeadlineโ
Specify the deadline date before the user is allowed to defer.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-MinimizeWindowsโ
Specifies whether to minimize other windows when displaying prompt. Default: $true.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: True
Accept pipeline input: False
Accept wildcard characters: False
-TopMostโ
Specifies whether the windows is the topmost window. Default: $true.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: True
Accept pipeline input: False
Accept wildcard characters: False
-ForceCountdownโ
Specify a countdown to display before automatically proceeding with the installation when a deferral is enabled.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 9
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-CustomTextโ
Specify whether to display a custom message specified in the XML file. Custom message must be populated for each language section in the XML.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
CommonParametersโ
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTSโ
Noneโ
You cannot pipe objects to this function.โ
OUTPUTSโ
System.Stringโ
Returns the user's selection.โ
NOTESโ
This is an internal script function and should typically not be called directly. It is used by the Show-InstallationWelcome prompt to display a custom prompt.