Public/Get-HPSAccountPolicy.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
Function Get-HPSAccountPolicy {

    <#
        .SYNOPSIS
        n/a

        .DESCRIPTION
        n/a

        .PARAMETER Type
        n/a

        .OUTPUTS
        System.Object

        .EXAMPLE
        Get-HPSAccountPolicyRule

        .LINK
        https://hardening.thomas-illiet.fr/Public/Get-HPSAccountPolicy/

        .LINK
        https://github.com/thomas-illiet/Hardening/blob/stable/Hardening/Public/Get-HPSAccountPolicy.ps1

        .NOTES
        - File Name : Get-HPSAccountPolicy.ps1
        - Author : Thomas ILLIET
    #>


    [CmdletBinding( HelpUri = "https://hardening.thomas-illiet.fr/Public/Get-HPSAccountPolicy" )]
    [OutputType( [System.Object] )]
    Param(
        [Parameter()]
        [ValidateSet('Local','Gpo')]
        [System.String]
        $Type = 'Local'
    )

    begin {
        Write-Verbose "[$($MyInvocation.MyCommand.Name)] Function started"
    }

    process {
        Get-HPSSecurityPolicy -ConfigName 'AccountPolicy' -Type $Type
    }

    end {
        Write-Verbose "[$($MyInvocation.MyCommand.Name)] Complete"
    }
}