forked from OSDeploy/OSDBuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OSDBuilder.psm1
55 lines (50 loc) · 3.37 KB
/
OSDBuilder.psm1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#===================================================================================================
# Import Functions
# https://github.com/RamblingCookieMonster/PSStackExchange/blob/master/PSStackExchange/PSStackExchange.psm1
#===================================================================================================
$OSDPublicFunctions = @( Get-ChildItem -Path $PSScriptRoot\Public\*.ps1 -Recurse -ErrorAction SilentlyContinue )
$OSDPrivateFunctions = @( Get-ChildItem -Path $PSScriptRoot\Private\*.ps1 -Recurse -ErrorAction SilentlyContinue )
foreach ($Import in @($OSDPublicFunctions + $OSDPrivateFunctions)) {
Try {. $Import.FullName}
Catch {Write-Error -Message "Failed to import function $($Import.FullName): $_"}
}
Export-ModuleMember -Function $OSDPublicFunctions.BaseName
New-Alias -Name Get-OSBuilder -Value Get-OSDBuilder -Force -ErrorAction SilentlyContinue
New-Alias -Name New-OSBMediaISO -Value New-OSDBuilderISO -Force -ErrorAction SilentlyContinue
New-Alias -Name New-OSBMediaUSB -Value New-OSDBuilderUSB -Force -ErrorAction SilentlyContinue
New-Alias -Name Show-OSBMediaInfo -Value Show-OSDBuilderInfo -Force -ErrorAction SilentlyContinue
New-Alias -Name Get-DownOSDBuilder -Value Save-OSDBuilderDownload -Force -ErrorAction SilentlyContinue
<# #===================================================================================================
# ImportOSD
#===================================================================================================
try {New-Alias -Name ImportOSD -Value Import-OSMedia -Force -ErrorAction SilentlyContinue}
catch {}
#===================================================================================================
# UpdateOSD
#===================================================================================================
try {New-Alias -Name UpdateOSD -Value Update-OSMedia -Force -ErrorAction SilentlyContinue}
catch {}
#===================================================================================================
# BuildOSD
#===================================================================================================
try {New-Alias -Name BuildOSD -Value New-OSBuild -Force -ErrorAction SilentlyContinue}
catch {}
#===================================================================================================
# OSDISO
#===================================================================================================
try {New-Alias -Name OSDISO -Value New-OSDBuilderISO -Force -ErrorAction SilentlyContinue}
catch {}
#===================================================================================================
# OSDUSB
#===================================================================================================
try {New-Alias -Name OSDUSB -Value New-OSDBuilderUSB -Force -ErrorAction SilentlyContinue}
catch {}
#===================================================================================================
# OSDInfo
#===================================================================================================
try {New-Alias -Name OSDInfo -Value Show-OSDBuilderInfo -Force -ErrorAction SilentlyContinue}
catch {} #>
#===================================================================================================
# Export-ModuleMember
#===================================================================================================
Export-ModuleMember -Function * -Alias *