PS-AutomationHelper.psm1

Write-Verbose 'Importing Functions'
$functionsDirectory = "$PSScriptRoot\public\*.ps1"
$functions = Get-ChildItem $functionsDirectory
$filesToImport = $functions

foreach ($file in ($filesToImport)) {
  Write-Verbose "Importing $($file.Name)."
  . $file.FullName
}

$classes = Get-ChildItem -Path "$PSScriptRoot\Public\Classes\*.cs"
$classes | ForEach-Object {
  $rawText = Get-Content $_.FullName -Raw
  Add-Type -TypeDefinition $rawText
}
$accelerators = [PSObject].Assembly.GetType('System.Management.Automation.TypeAccelerators')
$accelerators::Add('ExecutionStep', 'PS.Automation.Helper.ExecutionStep')

# SIG # Begin signature block
# MIIPFwYJKoZIhvcNAQcCoIIPCDCCDwQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDLr+6yk4dorW5H
# rmuVZsah67Kd1ip0fV3KmxJwt6zlN6CCDBQwggXqMIIE0qADAgECAhBb43g/0Jux
# +D5VsO4a+HT+MA0GCSqGSIb3DQEBCwUAMIGRMQswCQYDVQQGEwJHQjEbMBkGA1UE
# CBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQK
# ExFDT01PRE8gQ0EgTGltaXRlZDE3MDUGA1UEAxMuQ09NT0RPIFJTQSBFeHRlbmRl
# ZCBWYWxpZGF0aW9uIENvZGUgU2lnbmluZyBDQTAeFw0yMTAxMjcwMDAwMDBaFw0y
# NDAxMjcyMzU5NTlaMIHnMRgwFgYDVQQFEw9DSEUtMTA0LjY5NS4zNDExEzARBgsr
# BgEEAYI3PAIBAxMCQ0gxHTAbBgNVBA8TFFByaXZhdGUgT3JnYW5pemF0aW9uMQsw
# CQYDVQQGEwJDSDENMAsGA1UEEQwEODU3NTEQMA4GA1UECAwHVGh1cmdhdTEUM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