IdentityManager.psm1
|
<# .SYNOPSIS .DESCRIPTION .EXAMPLE .INPUTS .OUTPUTS #> [CmdletBinding()] param( [bool]$DotSourceModule = $false ) #Get function files. Includes both *.ps1 and *.psm1 function files (e.g. Functions/CLI, #Functions/Object, Functions/Helper ship their functions inside .psm1 files), excluding #this root module file itself so it isn't re-executed. Get-ChildItem $PSScriptRoot\ -Recurse -Include "*.ps1", "*.psm1" -Exclude "*.ps1xml" | Where-Object { $_.FullName -ne $PSCommandPath } | ForEach-Object { if ($DotSourceModule) { . $_.FullName } else { $ExecutionContext.InvokeCommand.InvokeScript( $false, ( [scriptblock]::Create( [io.file]::ReadAllText( $_.FullName, [Text.Encoding]::UTF8 ) ) ), $null, $null ) } } [System.Version]$Version = "0.0" Set-Variable -Name ExternalVersion -Value $Version -Scope Script |