Module/Rule.Group/Convert/Methods.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
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
#region Method Functions
<#
    .SYNOPSIS
        Retrieves the Group Details (GroupName and MembersToExclude) from the
        STIG rule check-content
    .PARAMETER CheckContent
        Specifies the check-content element in the xccdf
#>

function Get-GroupDetail
{
    [CmdletBinding()]
    [OutputType([pscustomobject])]
    param
    (
        [Parameter(Mandatory = $true)]
        [AllowEmptyString()]
        [string[]]
        $CheckContent
    )

    $templateFile = "$PSScriptRoot\Template.GroupDetail.txt"
    $result = $checkContent | ConvertFrom-String -TemplateFile $templateFile

    return $result
}
#endregion