Initial commit
This commit is contained in:
53
Microsoft.SelfService.Portal.PowerShell.Domain.psm1
Normal file
53
Microsoft.SelfService.Portal.PowerShell.Domain.psm1
Normal file
@@ -0,0 +1,53 @@
|
||||
Import-Module -Name "Microsoft.SelfService.Portal.PowerShell.Core" -Force
|
||||
|
||||
function Get-SSPDomains {
|
||||
return $(Invoke-SSPRequest -Method Get -Endpoint "Domain")
|
||||
}
|
||||
|
||||
function Get-SSPDomainById {
|
||||
Param(
|
||||
[System.Guid] $Id
|
||||
)
|
||||
|
||||
return $(Invoke-SSPRequest -Method Get -Endpoint "Domain" -Query "Id/$Id")
|
||||
}
|
||||
|
||||
function Get-SSPDomainByName {
|
||||
Param(
|
||||
[System.String] $Name
|
||||
)
|
||||
|
||||
return $(Invoke-SSPRequest -Method Get -Endpoint "Domain" -Query "Name/$Name")
|
||||
}
|
||||
|
||||
function Get-SSPDomainByNetBIOS {
|
||||
Param(
|
||||
[System.String] $Name
|
||||
)
|
||||
|
||||
return $(Invoke-SSPRequest -Method Get -Endpoint "Domain" -Query "NetBIOS/$Name")
|
||||
}
|
||||
|
||||
function Get-SSPDomainByFQDN {
|
||||
Param(
|
||||
[System.String] $Name
|
||||
)
|
||||
|
||||
return $(Invoke-SSPRequest -Method Get -Endpoint "Domain" -Query "FQDN/$Name")
|
||||
}
|
||||
|
||||
function Get-SSPDomainEnvironments {
|
||||
Param(
|
||||
[System.Guid] $Id
|
||||
)
|
||||
|
||||
return $(Invoke-SSPRequest -Method Get -Endpoint "Domain" -Query "$Id/Environments").environmentDomains.environment
|
||||
}
|
||||
|
||||
function New-SSPDomain {
|
||||
Param(
|
||||
[System.Collections.Hashtable] $Data
|
||||
)
|
||||
|
||||
return $(Invoke-SSPRequest -Method Post -Endpoint "Domain" -Body $($Data | ConvertTo-JsonNewtonsoft))
|
||||
}
|
||||
Reference in New Issue
Block a user