Public/New-bConnectApplicationAUTFileRule.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Function New-bConnectApplicationAUTFileRule() {
    <#
        .Synopsis
            Creates a new AUTFileRule for Applications.
        .Parameter FileName
            Name of the file
        .Parameter FileSize
            Size of the file
        .Parameter Date
            Timestamp as Date of the file
        .Parameter CRC
            Checksum of the file
        .Parameter Version
            Version of the file
        .Parameter Company
            Company of the file
        .Parameter ProductName
            Product name of the file
        .Parameter InternalName
            Internal name of the file
        .Parameter Language
            Language of the file
        .Parameter ProductVersion
            Product version of the file
        .Parameter FileDescription
            File description of the file
        .Parameter FileVersionNumeric
            Numerical file version
        .Parameter CommandLine
            Command line parameters
        .Outputs
            AUTFileRule (see bConnect documentation for more details)
    #>


    [OutputType("System.Management.Automations.PSObject")]
    Param(
        [string]$FileName,
        [uint64]$FileSize,
        [string]$Date,
        [uint64]$CRC,
        [string]$Version,
        [string]$Company,
        [string]$ProductName,
        [string]$InternalName,
        [string]$Language,
        [string]$ProductVersion,
        [string]$FileDescription,
        [string]$FileVersionNumeric,
        [string]$CommandLine
    )

    $_new_aut = @{
        FileName = $FileName;
        FileSize = $FileSize;
        Date = $Date;
        CRC = $CRC;
        Version = $Version;
        Company = $Company;
        ProductName = $ProductName;
        InternalName = $InternalName;
        Language = $Language;
        ProductVersion = $ProductVersion;
        FileDescription = $FileDescription;
        FileVersionNumeric = $FileVersionNumeric;
        CommandLine = $CommandLine;
    }

    return $_new_aut
}