Files
Microsoft.SelfService.Porta…/Microsoft.SelfService.Portal.PowerShell.Template.psm1
Torsten Brendgen eb7a07c027 Initial commit
2026-04-13 15:55:12 +02:00

69 lines
1.7 KiB
PowerShell

Import-Module -Name "Microsoft.SelfService.Portal.PowerShell.Core" -Force
function Get-SSPTemplates {
return $(Invoke-SSPRequest -Method Get -Endpoint "Template")
}
function Get-SSPTemplateCategories {
return $(Invoke-SSPRequest -Method Get -Endpoint "TemplateCategory")
}
function Get-SSPTemplateOptions {
return $(Invoke-SSPRequest -Method Get -Endpoint "TemplateOption")
}
function Get-SSPTemplateById {
Param(
[System.Guid] $Id
)
return $(Invoke-SSPRequest -Method Get -Endpoint "Template" -Query "Id/$Id")
}
function Get-SSPTemplateByName {
Param(
[System.String] $Name
)
return $(Invoke-SSPRequest -Method Get -Endpoint "Template" -Query "Name/$Name")
}
function Get-SSPTemplateCategoryById {
Param(
[System.Guid] $Id
)
return $(Invoke-SSPRequest -Method Get -Endpoint "TemplateCategory" -Query $Id)
}
function Get-SSPTemplateOptionsById {
Param(
[System.Guid] $Id
)
return $(Invoke-SSPRequest -Method Get -Endpoint "TemplateOption" -Query "Id/$Id")
}
function New-SSPTemplate {
Param(
[System.Collections.Hashtable] $Data
)
return $(Invoke-SSPRequest -Method Post -Endpoint "Template" -Body $($Data | ConvertTo-JsonNewtonsoft))
}
function New-SSPTemplateCategory {
Param(
[System.Collections.Hashtable] $Data
)
return $(Invoke-SSPRequest -Method Post -Endpoint "TemplateCategory" -Body $($Data | ConvertTo-JsonNewtonsoft))
}
function New-SSPTemplateOption {
Param(
[System.Collections.Hashtable] $Data
)
return $(Invoke-SSPRequest -Method Post -Endpoint "TemplateOption" -Body $($Data | ConvertTo-JsonNewtonsoft))
}