Initial commit
This commit is contained in:
49
Microsoft.SelfService.Portal.PowerShell.Option.psm1
Normal file
49
Microsoft.SelfService.Portal.PowerShell.Option.psm1
Normal file
@@ -0,0 +1,49 @@
|
||||
Import-Module -Name "Microsoft.SelfService.Portal.PowerShell.Core" -Force
|
||||
|
||||
function Get-SSPOptions {
|
||||
return $(Invoke-SSPRequest -Method Get -Endpoint "Option")
|
||||
}
|
||||
|
||||
function Get-SSPOptionCategories {
|
||||
return $(Invoke-SSPRequest -Method Get -Endpoint "OptionCategory")
|
||||
}
|
||||
|
||||
function Get-SSPOptionById {
|
||||
Param(
|
||||
[System.Guid] $Id
|
||||
)
|
||||
|
||||
return $(Invoke-SSPRequest -Method Get -Endpoint "Option" -Query "Id/$Id")
|
||||
}
|
||||
|
||||
function Get-SSPOptionByName {
|
||||
Param(
|
||||
[System.String] $Name
|
||||
)
|
||||
|
||||
return $(Invoke-SSPRequest -Method Get -Endpoint "Option" -Query "Name/$Name")
|
||||
}
|
||||
|
||||
function Get-SSPOptionCategoryById {
|
||||
Param(
|
||||
[System.Guid] $Id
|
||||
)
|
||||
|
||||
return $(Invoke-SSPRequest -Method Get -Endpoint "OptionCategory" -Query $Id)
|
||||
}
|
||||
|
||||
function New-SSPOption {
|
||||
Param(
|
||||
[System.Collections.Hashtable] $Data
|
||||
)
|
||||
|
||||
return $(Invoke-SSPRequest -Method Post -Endpoint "Option" -Body $($Data | ConvertTo-JsonNewtonsoft))
|
||||
}
|
||||
|
||||
function New-SSPOptionCategory {
|
||||
Param(
|
||||
[System.Collections.Hashtable] $Data
|
||||
)
|
||||
|
||||
return $(Invoke-SSPRequest -Method Post -Endpoint "OptionCategory" -Body $($Data | ConvertTo-JsonNewtonsoft))
|
||||
}
|
||||
Reference in New Issue
Block a user