Gutcheck.psm1
|
#Requires -Version 5.1 # Importing this module must do nothing but define functions: no diagnostics, no files, # no console output, no prompts. Everything a Run does happens inside Invoke-Gutcheck. $ErrorActionPreference = 'Stop' $private:files = @( Get-ChildItem -Path (Join-Path $PSScriptRoot 'Private') -Filter '*.ps1' -Recurse -File Get-ChildItem -Path (Join-Path $PSScriptRoot 'Public') -Filter '*.ps1' -Recurse -File ) foreach ($private:file in $private:files) { . $private:file.FullName } # Closes the set of Kinds a Check Definition may select from. Building a lookup table is # not a diagnostic: nothing is examined, written or prompted for here. Initialize-KindVocabulary # What a Technician actually types. The function has to be called Invoke-Gutcheck, because # a published module obeys verb-noun and the Gallery complains when it does not - but # nobody standing at a Customer's machine should have to type a verb to run the one thing # this module does. The alias is the command; Invoke-Gutcheck is its full name. Set-Alias -Name 'gutcheck' -Value 'Invoke-Gutcheck' Export-ModuleMember -Function 'Invoke-Gutcheck' -Alias 'gutcheck' |