Private/Get-HPSModulePath.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 Get-HPSModulePath {

    <#
        .SYNOPSIS
        Get current module path

        .DESCRIPTION
        Simple function to get module path with $ModulePath, and allow to makes it easy to test the project functions.

        .EXAMPLE
        Get-HPSModulePath

        .OUTPUTS
        System.String

        .LINK
        https://hardening.thomas-illiet.fr/Private/Get-HPSModulePath/

        .LINK
        https://github.com/thomas-illiet/Hardening/blob/stable/Hardening/Private/Get-HPSModulePath.ps1

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


    [CmdletBinding( HelpUri = "https://hardening.thomas-illiet.fr/Private/Get-HPSModulePath/" )]
    [OutputType( [System.String] )]
    Param()

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

    process {
        return $Script:ModulePath
    }

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