Public/New-bConnectApplicationUninstallOptions.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Function New-bConnectApplicationUninstallOptions() {
    <#
        .Synopsis
            Creates a new UninstallApplicationOption for Applications.
            Empty or filled with given information.
        .Parameter RebootBehaviour
            Reboot behaviour after installation
        .Parameter RemoveUnknownSoftware
            If set, removal of not installed software will be started
        .Parameter UseBbt
            If set, bBT is supported
        .Parameter VisibleExecution
            Shows in which cases the execution of this software is visible
        .Parameter CopyLocally
            If set, installation files should be copied to local filesystem
        .Parameter DisableInputDevices
            If set, no input devices will be available during installation
        .Outputs
            InstallApplicationOption (see bConnect documentation for more details)
    #>


    [OutputType("System.Management.Automations.PSObject")]
    Param(
        [ValidateSet("NoReboot","Reboot","AppReboot","DeferrableReboot",ignoreCase=$true)][string]$RebootBehaviour = "NoReboot",
        [switch]$RemoveUnknownSoftware,
        [switch]$UsebBT,
        [ValidateSet("Silent","NeedsDesktop","VisibleWhenUserLoggedOn",ignoreCase=$true)][string]$VisibleExecution = "Silent",
        [switch]$CopyLocally,
        [switch]$DisableInputDevices
    )

    $_new_uninstallationOption = @{
        RebootBehaviour = $RebootBehaviour;
        RemoveUnknownSoftware = $RemoveUnknownSoftware;
        UsebBT = $UsebBT;
        VisibleExecution = $VisibleExecution;
        CopyLocally = $CopyLocally;
        DisableInputDevices = $DisableInputDevices;
    }

    return $_new_uninstallationOption
}