Initial commit
This commit is contained in:
37
Microsoft.SelfService.Portal.PowerShell.Environment.psm1
Normal file
37
Microsoft.SelfService.Portal.PowerShell.Environment.psm1
Normal file
@@ -0,0 +1,37 @@
|
||||
Import-Module -Name "Microsoft.SelfService.Portal.PowerShell.Core" -Force
|
||||
|
||||
function Get-SSPEnvironments {
|
||||
return $(Invoke-SSPRequest -Method Get -Endpoint "Environment")
|
||||
}
|
||||
|
||||
function Get-SSPEnvironmentById {
|
||||
Param(
|
||||
[System.Guid] $Id
|
||||
)
|
||||
|
||||
return $(Invoke-SSPRequest -Method Get -Endpoint "Environment" -Query "Id/$Id")
|
||||
}
|
||||
|
||||
function Get-SSPEnvironmentByName {
|
||||
Param(
|
||||
[System.String] $Name
|
||||
)
|
||||
|
||||
return $(Invoke-SSPRequest -Method Get -Endpoint "Environment" -Query "Name/$Name")
|
||||
}
|
||||
|
||||
function Get-SSPEnvironmentDomains {
|
||||
Param(
|
||||
[System.Guid] $Id
|
||||
)
|
||||
|
||||
return $(Invoke-SSPRequest -Method Get -Endpoint "Environment" -Query "$Id/Environments").environmentDomains.environment
|
||||
}
|
||||
|
||||
function New-SSPEnvironment {
|
||||
Param(
|
||||
[System.Collections.Hashtable] $Data
|
||||
)
|
||||
|
||||
return $(Invoke-SSPRequest -Method Post -Endpoint "Environment" -Body $($Data | ConvertTo-JsonNewtonsoft))
|
||||
}
|
||||
Reference in New Issue
Block a user