Initial commit

This commit is contained in:
Torsten Brendgen
2026-04-13 15:55:12 +02:00
commit eb7a07c027
2 changed files with 80 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
@{
ModuleVersion = '1.0.0'
GUID = 'fc5bd1d1-c958-46e2-a9a6-00eb047b4e9f'
Author = 'Torsten Brendgen'
Description = 'Microsoft SelfService Portal Domain PowerShell Functions'
RootModule = 'Microsoft.SelfService.Portal.PowerShell.Template.psm1'
FunctionsToExport = '*'
CmdletsToExport = @()
VariablesToExport = @()
AliasesToExport = @()
}

View File

@@ -0,0 +1,69 @@
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))
}