Public/Format-Functions.ps1

Function Format-Functions {
    <#
        .SYNOPSIS
        Accepts an array of Strings and formats them for pasting into the FunctionsToExport section of the module
 
        .INPUTS
        $List = Get-ChildItem "\WFM-Tools\Functions\*.ps1"
        $Array = $List.BaseName | Sort-Object
        Format-Functions $Array
 
        .OUTPUTS
        FunctionstoExport = @("Format-Functions" , "Get-Accounts" , "Get-ADUserList" , "Get-AllArrayData" , "Get-ArrayProperties" , "Get-Certificates" , "Get-Lockouts" , "Get-PCInfo" , "Get-Team" , "Get-User" , "Get-WinEventData" , "Install-Dependencies" , "Start-ADUC" , "Start-DataSanitization" , "Start-ISE")
 
        .EXAMPLE
        $List = Get-ChildItem "\WFM-Tools\Functions\*.ps1"
        $Array = $List.BaseName | Sort-Object
        Format-Functions $Array
    #>

    [CmdletBinding()]
    param (
        [Parameter(
            Mandatory
        )]
        [array]
        $Array
    )
    $Array = $Array | Sort-Object -Unique
    $Data = $Array -join "`" , `""
    $Data = "`"" + $Data + "`""
    $Data = "FunctionstoExport = @($Data)"
    Return $Data
}