Initial commit
This commit is contained in:
11
Microsoft.SelfService.Portal.PowerShell.Template.psd1
Normal file
11
Microsoft.SelfService.Portal.PowerShell.Template.psd1
Normal 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 = @()
|
||||||
|
}
|
||||||
69
Microsoft.SelfService.Portal.PowerShell.Template.psm1
Normal file
69
Microsoft.SelfService.Portal.PowerShell.Template.psm1
Normal 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))
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user