-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathAutopilotOOBE.psm1
18 lines (16 loc) · 1005 Bytes
/
AutopilotOOBE.psm1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#================================================
# Functions
# https://github.com/RamblingCookieMonster/PSStackExchange/blob/master/PSStackExchange/PSStackExchange.psm1
#================================================
$AutopilotOOBEPublicFunctions = @( Get-ChildItem -Path $PSScriptRoot\Public\*.ps1 -ErrorAction SilentlyContinue )
$AutopilotOOBEPrivateFunctions = @( Get-ChildItem -Path $PSScriptRoot\Private\*.ps1 -ErrorAction SilentlyContinue )
foreach ($Import in @($AutopilotOOBEPublicFunctions + $AutopilotOOBEPrivateFunctions)) {
Try {. $Import.FullName}
Catch {Write-Error -Message "Failed to import function $($Import.FullName): $_"}
}
Export-ModuleMember -Function $AutopilotOOBEPublicFunctions.BaseName
#================================================
# Alias
#================================================
New-Alias -Name AutopilotOOBE -Value Start-AutopilotOOBE -Force -ErrorAction SilentlyContinue
Export-ModuleMember -Function Start-AutopilotOOBE -Alias AutopilotOOBE