-
-
Notifications
You must be signed in to change notification settings - Fork 41
/
HaloAPI.psm1
20 lines (20 loc) · 984 Bytes
/
HaloAPI.psm1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#Requires -Version 7
$Functions = @(Get-ChildItem -Path $PSScriptRoot\Public\ -Include *.ps1 -Recurse) + @(Get-ChildItem -Path $PSScriptRoot\Private\ -Include *.ps1 -Recurse)
# Import functions.
foreach ($Function in @($Functions)) {
try {
Write-Verbose "Importing function $($Function.FullName)"
. $Function.FullName
} catch {
Write-Error -Message "Failed to import function $($Function.FullName): $_"
}
}
[int32]$Script:HAPIDefaultPageSize = 1000
New-Alias -Name 'Get-HaloArticle' -Value Get-HaloKBArticle
New-Alias -Name 'New-HaloArticle' -Value New-HaloKBArticle
New-Alias -Name 'Set-HaloArticle' -Value Set-HaloKBArticle
New-Alias -Name 'New-HaloArticleBatch' -Value New-HaloKBArticleBatch
New-Alias -Name 'Get-HaloCustomFields' -Value Get-HaloCustomField
New-Alias -Name 'Get-HaloWorkflows' -Value Get-HaloWorkflow
New-Alias -Name 'Get-HaloTabs' -Value Get-HaloTab
Export-ModuleMember -Function $Functions.BaseName -Alias *