Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
NikCharlebois committed Jan 27, 2023
1 parent 265ee8b commit 549e708
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
* PlannerTask
* Fixed issue where Attachments Uri weren't properly exiting single quotes.
FIXES [#2822](https://github.com/microsoft/Microsoft365DSC/issues/2822)
* PPPowerAppsEnvironment
* Adds support for Developr SKU and fix for Teams SKU
FIXES [#2821](https://github.com/microsoft/Microsoft365DSC/issues/2821)
* SCProtectionAlert
* Support for certificate based auth
* Fix removal of alert
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function Get-TargetResource

[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Production', 'Standard', 'Trial', 'Sandbox', 'SubscriptionBasedTrial', 'Teams')]
[ValidateSet('Production', 'Trial', 'Sandbox', 'SubscriptionBasedTrial', 'Teams', 'Developer')]
$EnvironmentSKU,

[Parameter()]
Expand Down Expand Up @@ -73,10 +73,15 @@ function Get-TargetResource
}

Write-Verbose -Message "Found PowerApps Environment {$DisplayName}"
$environmentType = $environment.EnvironmentType
if ($environmentType -eq 'Notspecified')
{
$environmentType = 'Teams'
}
return @{
DisplayName = $DisplayName
Location = $environment.Location
EnvironmentSKU = $environment.EnvironmentType
EnvironmentSKU = $environmentType
Ensure = 'Present'
Credential = $Credential
ApplicationId = $ApplicationId
Expand Down Expand Up @@ -112,7 +117,7 @@ function Set-TargetResource

[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Production', 'Standard', 'Trial', 'Sandbox', 'SubscriptionBasedTrial', 'Teams')]
[ValidateSet('Production', 'Trial', 'Sandbox', 'SubscriptionBasedTrial', 'Teams', 'Developer')]
$EnvironmentSKU,

[Parameter()]
Expand Down Expand Up @@ -207,7 +212,7 @@ function Test-TargetResource

[Parameter(Mandatory = $true)]
[System.String]
[ValidateSet('Production', 'Standard', 'Trial', 'Sandbox', 'SubscriptionBasedTrial', 'Teams')]
[ValidateSet('Production', 'Trial', 'Sandbox', 'SubscriptionBasedTrial', 'Teams', 'Developer')]
$EnvironmentSKU,

[Parameter()]
Expand Down Expand Up @@ -322,13 +327,18 @@ function Export-TargetResource
}
foreach ($environment in $environments)
{
Write-Host " |---[$i/$($environments.Count)] $($environment.DisplayName)" -NoNewline
if ($environment.EnvironmentType -ne 'Default' -and $environment.EnvironmentType -ne 'NotSpecified' -and $environment.EnvironmentType -ne 'Developer')
if ($environment.EnvironmentType -ne 'Default')
{
Write-Host " |---[$i/$($environments.Count)] $($environment.DisplayName)" -NoNewline
$environmentType = $environment.EnvironmentType
if ($environmentType -eq 'Notspecified')
{
$environmentType = 'Teams'
}
$Params = @{
DisplayName = $environment.DisplayName
Location = $environment.Location
EnvironmentSku = $environment.EnvironmentType
EnvironmentSku = $environmentType
Credential = $Credential
ApplicationId = $ApplicationId
TenantId = $TenantId
Expand All @@ -351,8 +361,8 @@ function Export-TargetResource
}
else
{
Write-Host "`r`n |---Skipping $($environment.DisplayName) because of environment sku $($environment.EnvironmentType) " -NoNewline
Write-Host $Global:M365DSCEmojiRedX
Write-Host " |---[$i/$($environments.Count)] Skipping Default Environment $($environment.DisplayName)" -NoNewline
Write-Host $Global:M365DSCEmojiInformation
}
$i++
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class MSFT_PPPowerAppsEnvironment : OMI_BaseResource
{
[Key, Description("Display name for the PowerApps environment")] String DisplayName;
[Required, Description("Location of the PowerApps environment."), ValueMap{"canada","unitedstates","europe","asia","australia","india","japan","unitedkingdom","unitedstatesfirstrelease","southamerica","france","usgov"}, Values{"canada","unitedstates","europe","asia","australia","india","japan","unitedkingdom","unitedstatesfirstrelease","southamerica","france","usgov"}] string Location;
[Required, Description("Environment type."), ValueMap{"Production","Standard","Trial","Sandbox","SubscriptionBasedTrial", "Teams"}, Values{"Production","Standard","Trial","Sandbox","SubscriptionBasedTrial", "Teams"}] String EnvironmentSKU;
[Required, Description("Environment type."), ValueMap{"Production","Standard","Trial","Sandbox","SubscriptionBasedTrial", "Teams", "Developer"}, Values{"Production","Standard","Trial","Sandbox","SubscriptionBasedTrial", "Teams", "Developer"}] String EnvironmentSKU;
[Write, Description("Only accepted value is 'Present'."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure;
[Write, Description("Credentials of the Power Platform Admin"), EmbeddedInstance("MSFT_Credential")] string Credential;
[Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId;
Expand Down

0 comments on commit 549e708

Please sign in to comment.