Skip to content

Commit

Permalink
Merge pull request #147 from microsoft/Dev
Browse files Browse the repository at this point in the history
Release 1.0.0.733
  • Loading branch information
NikCharlebois authored Jul 12, 2019
2 parents 2cd3ccf + 25552ff commit abc511d
Show file tree
Hide file tree
Showing 114 changed files with 2,790 additions and 1,087 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

/Modules/Office365DSC/DSCResources/MSFT_SCRetentionCompliancePolicy/ @nikcharlebois
/Modules/Office365DSC/DSCResources/MSFT_SCRetentionComplianceRule/ @nikcharlebois
/Modules/Office365DSC/DSCResources/MSFT_SCSupervisoryReviewPolicy/ @nikcharlebois
/Modules/Office365DSC/DSCResources/MSFT_SCSupervisoryReviewRule/ @nikcharlebois

/Modules/Office365DSC/DSCResources/MSFT_SPOAccessControlSettings/ @thorstenloeschmann
/Modules/Office365DSC/DSCResources/MSFT_SPOApp/ @nikcharlebois
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,19 @@

## Unreleased

* GENERAL
* Updated Dependency on SharePointPnPPowerShellOnline
to version 3.11.1907.0
* BREAKING CHANGES
* O365Group
* ManagedBy is now a mandatory property
* Modules
* Added embedded Log Engine
* SCRetentionCompliancePolicy
* Initial Release
* SCRetentionComplianceRule
* Initial Release
* SCSupervisoryReviewPolicy
* Initial Release
* SCSupervisoryReviewRule
* Initial Release
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ function Get-TargetResource

Write-Verbose -Message "Getting configuration of Accepted Domain for $Identity"

Connect-ExchangeOnline -GlobalAdminAccount $GlobalAdminAccount
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform ExchangeOnline

$AllAcceptedDomains = Get-AcceptedDomain

$AcceptedDomain = ($AllAcceptedDomains | Where-Object -FilterScript { $_.Identity -IMatch $Identity })
Expand All @@ -46,7 +48,9 @@ function Get-TargetResource
Write-Verbose -Message "AcceptedDomain configuration for $($Identity) does not exist."

# Check to see if $Identity matches a verified domain in the O365 Tenant
Test-O365ServiceConnection -GlobalAdminAccount $GlobalAdminAccount
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform AzureAD

$VerifiedDomains = Get-AzureADDomain | Where-Object -FilterScript { $_.IsVerified }
$MatchingVerifiedDomain = $VerifiedDomains | Where-Object -FilterScript { $_.Name -eq $Identity }

Expand Down Expand Up @@ -134,7 +138,9 @@ function Set-TargetResource

Write-Verbose -Message "Setting configuration of Accepted Domain for $Identity"

Connect-ExchangeOnline -GlobalAdminAccount $GlobalAdminAccount
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform ExchangeOnline

$AcceptedDomainParams = @{
DomainType = $DomainType
Identity = $Identity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ function Get-TargetResource

Write-Verbose -Message "Getting configuration of AntiPhishPolicy for $Identity"

Connect-ExchangeOnline -GlobalAdminAccount $GlobalAdminAccount
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform ExchangeOnline

$AntiPhishPolicies = Get-AntiPhishPolicy

$AntiPhishPolicy = $AntiPhishPolicies | Where-Object -FilterScript { $_.Identity -eq $Identity }
Expand Down Expand Up @@ -280,7 +282,9 @@ function Set-TargetResource

Write-Verbose -Message "Setting configuration of AntiPhishPolicy for $Identity"

Connect-ExchangeOnline -GlobalAdminAccount $GlobalAdminAccount
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform ExchangeOnline

$AntiPhishPolicies = Get-AntiPhishPolicy

$AntiPhishPolicy = $AntiPhishPolicies | Where-Object -FilterScript { $_.Identity -eq $Identity }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ function Get-TargetResource

Write-Verbose -Message "Getting configuration of AntiPhishRule for $Identity"

Write-Verbose -Message "Calling Connect-ExchangeOnline function:"
Connect-ExchangeOnline -GlobalAdminAccount $GlobalAdminAccount
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform ExchangeOnline

Write-Verbose -Message "Global ExchangeOnlineSession status:"
Write-Verbose -Message "$( Get-PSSession -ErrorAction SilentlyContinue | Where-Object -FilterScript { $_.Name -eq 'ExchangeOnline' } | Out-String)"

Expand Down Expand Up @@ -181,7 +182,9 @@ function Set-TargetResource

Write-Verbose -Message "Setting configuration of AntiPhishRule for $Identity"

Connect-ExchangeOnline -GlobalAdminAccount $GlobalAdminAccount
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform ExchangeOnline

$AntiPhishRules = Get-AntiPhishRule

$AntiPhishRule = $AntiPhishRules | Where-Object -FilterScript { $_.Identity -eq $Identity }
Expand Down Expand Up @@ -284,6 +287,12 @@ function Test-TargetResource
$ValuesToCheck = $PSBoundParameters
$ValuesToCheck.Remove('GlobalAdminAccount') | Out-Null

if ($null -eq $PSBoundParameters.Enabled)
{
Write-Verbose "Removing Enabled from the list of Parameters to Test"
$ValuesToCheck.Remove("Enabled") | Out-Null
}

$TestResult = Test-Office365DSCParameterState -CurrentValues $CurrentValues `
-DesiredValues $PSBoundParameters `
-ValuesToCheck $ValuesToCheck.Keys
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function Get-TargetResource
$TrackClicks = $true,

[Parameter()]
[ValidateSet('Present', 'Absent')]
[ValidateSet('Present')]
[System.String]
$Ensure = 'Present',

Expand All @@ -45,17 +45,14 @@ function Get-TargetResource

Write-Verbose -Message "Getting configuration of AtpPolicyForO365 for $Identity"

if ('Absent' -eq $Ensure)
{
throw "EXOAtpPolicyForO365 configurations MUST specify Ensure value of 'Present'"
}

if ('Default' -ne $Identity)
{
throw "EXOAtpPolicyForO365 configurations MUST specify Identity value of 'Default'"
}

Connect-ExchangeOnline -GlobalAdminAccount $GlobalAdminAccount
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform ExchangeOnline

$AtpPolicies = Get-AtpPolicyForO365

$AtpPolicyForO365 = $AtpPolicies | Where-Object -FilterScript { $_.Identity -eq $Identity }
Expand Down Expand Up @@ -129,7 +126,7 @@ function Set-TargetResource
$TrackClicks = $true,

[Parameter()]
[ValidateSet('Present', 'Absent')]
[ValidateSet('Present')]
[System.String]
$Ensure = 'Present',

Expand All @@ -140,17 +137,14 @@ function Set-TargetResource

Write-Verbose -Message "Setting configuration of AtpPolicyForO365 for $Identity"

if ('Absent' -eq $Ensure)
{
throw "EXOAtpPolicyForO365 configurations MUST specify Ensure value of 'Present'"
}

if ('Default' -ne $Identity)
{
throw "EXOAtpPolicyForO365 configurations MUST specify Identity value of 'Default'"
}

Connect-ExchangeOnline -GlobalAdminAccount $GlobalAdminAccount
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform ExchangeOnline

$AtpPolicyParams = $PSBoundParameters
$AtpPolicyParams.Remove('Ensure') | Out-Null
$AtpPolicyParams.Remove('GlobalAdminAccount') | Out-Null
Expand Down Expand Up @@ -195,7 +189,7 @@ function Test-TargetResource
$TrackClicks = $true,

[Parameter()]
[ValidateSet('Present', 'Absent')]
[ValidateSet('Present')]
[System.String]
$Ensure = 'Present',

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class MSFT_EXOAtpPolicyForO365 : OMI_BaseResource
{
[Key, Description("Specifies the resource is a single instance, the value must be 'Yes'"), ValueMap{"Yes"}, Values{"Yes"}] String IsSingleInstance;
[Write, Description("The Identity parameter specifies the ATP policy that you want to modify. There's only one policy named Default.")] String Identity;
[Write, Description("Since there is only one policy, the default policy, this must be set to 'Present'"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure;
[Write, Description("Since there is only one policy, the default policy, this must be set to 'Present'"), ValueMap{"Present"}, Values{"Present"}] String Ensure;
[Write, Description("The AllowClickThrough parameter specifies whether to allow users to click through to the original blocked URL in Office 365 ProPlus. Default is $true.")] Boolean AllowClickThrough;
[Write, Description("The BlockUrls parameter specifies the URLs that are always blocked by Safe Links scanning. You can specify multiple values separated by commas.")] String BlockUrls[];
[Write, Description("The EnableATPForSPOTeamsODB parameter specifies whether ATP is enabled for SharePoint Online, OneDrive for Business and Microsoft Teams. Default is $false.")] Boolean EnableATPForSPOTeamsODB;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function Get-TargetResource
$PopEnabled = $true,

[Parameter()]
[ValidateSet('Present', 'Absent')]
[ValidateSet('Present')]
[System.String]
$Ensure = 'Present',

Expand All @@ -36,12 +36,9 @@ function Get-TargetResource

Write-Verbose -Message "Getting configuration of CASMailboxPlan for $Identity"

if ('Absent' -eq $Ensure)
{
throw "EXOCASMailboxPlan configurations MUST specify Ensure value of 'Present'"
}
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform ExchangeOnline

Connect-ExchangeOnline -GlobalAdminAccount $GlobalAdminAccount
$CASMailboxPlans = Get-CASMailboxPlan

$CASMailboxPlan = $CASMailboxPlans | Where-Object -FilterScript { $_.Identity -eq $Identity }
Expand Down Expand Up @@ -106,7 +103,7 @@ function Set-TargetResource
$PopEnabled = $true,

[Parameter()]
[ValidateSet('Present', 'Absent')]
[ValidateSet('Present')]
[System.String]
$Ensure = 'Present',

Expand All @@ -117,12 +114,8 @@ function Set-TargetResource

Write-Verbose -Message "Setting configuration of CASMailboxPlan for $Identity"

if ('Absent' -eq $Ensure)
{
throw "EXOCASMailboxPlan configurations MUST specify Ensure value of 'Present'"
}

Connect-ExchangeOnline -GlobalAdminAccount $GlobalAdminAccount
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform ExchangeOnline

$CASMailboxPlanParams = $PSBoundParameters
$CASMailboxPlanParams.Remove('Ensure') | Out-Null
Expand Down Expand Up @@ -169,7 +162,7 @@ function Test-TargetResource
$PopEnabled = $true,

[Parameter()]
[ValidateSet('Present', 'Absent')]
[ValidateSet('Present')]
[System.String]
$Ensure = 'Present',

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
class MSFT_EXOCASMailboxPlan : OMI_BaseResource
{
[Key, Description("The Identity parameter specifies the CAS Mailbox Plan that you want to modify.")] String Identity;
[Write, Description("CASMailboxPlans cannot be created/removed in O365. This must be set to 'Present'"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure;
[Write, Description("CASMailboxPlans cannot be created/removed in O365. This must be set to 'Present'"), ValueMap{"Present"}, Values{"Present"}] String Ensure;
[Write, Description("The ActiveSyncEnabled parameter enables or disables access to the mailbox by using Exchange Active Sync. Default is $true.")] Boolean ActiveSyncEnabled;
[Write, Description("The ImapEnabled parameter enables or disables access to the mailbox by using IMAP4 clients. The default value is $true for all CAS mailbox plans except ExchangeOnlineDeskless which is $false by default.")] Boolean ImapEnabled;
[Write, Description("The OwaMailboxPolicy parameter specifies the Outlook on the web (formerly known as Outlook Web App) mailbox policy for the mailbox plan. The default value is OwaMailboxPolicy-Default. You can use the Get-OwaMailboxPolicy cmdlet to view the available Outlook on the web mailbox policies.")] String OwaMailboxPolicy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ function Get-TargetResource

Write-Verbose -Message "Getting configuration of ClientAccessRule for $Identity"

Connect-ExchangeOnline -GlobalAdminAccount $GlobalAdminAccount
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform ExchangeOnline


$ClientAccessRules = Get-ClientAccessRule

Expand Down Expand Up @@ -203,7 +205,9 @@ function Set-TargetResource

Write-Verbose -Message "Setting configuration of ClientAccessRule for $Identity"

Connect-ExchangeOnline -GlobalAdminAccount $GlobalAdminAccount
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform ExchangeOnline


$ClientAccessRules = Get-ClientAccessRule

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ function Get-TargetResource

Write-Verbose -Message "Getting configuration of DkimSigningConfig for $Identity"

Write-Verbose -Message "Calling Connect-ExchangeOnline function:"
Connect-ExchangeOnline -GlobalAdminAccount $GlobalAdminAccount
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform ExchangeOnline

Write-Verbose -Message "Global ExchangeOnlineSession status:"
Write-Verbose -Message "$( Get-PSSession -ErrorAction SilentlyContinue | Where-Object -FilterScript { $_.Name -eq 'ExchangeOnline' } | Out-String)"
Expand Down Expand Up @@ -138,7 +138,8 @@ function Set-TargetResource

Write-Verbose -Message "Setting configuration of DkimSigningConfig for $Identity"

Connect-ExchangeOnline -GlobalAdminAccount $GlobalAdminAccount
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform ExchangeOnline

$DkimSigningConfigs = Get-DkimSigningConfig

Expand Down Expand Up @@ -169,7 +170,7 @@ function Set-TargetResource
if (('Absent' -eq $Ensure ) -and ($DkimSigningConfig))
{
Write-Verbose -Message "Removing DkimSigningConfig $($Identity) "
Remove-DkimSigningConfig -Identity $Identity -Confirm:$false
Remove-DkimSigningConfig -Identity $Identity -Confirm:$false
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ function Get-TargetResource

Write-Verbose -Message "Setting configuration of HostedConnectionFilterPolicy for $Identity"

Write-Verbose -Message "Calling Connect-ExchangeOnline function:"
Connect-ExchangeOnline -GlobalAdminAccount $GlobalAdminAccount
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform ExchangeOnline

Write-Verbose -Message "Global ExchangeOnlineSession status:"
Write-Verbose -Message "$( Get-PSSession -ErrorAction SilentlyContinue | Where-Object -FilterScript { $_.Name -eq 'ExchangeOnline' } | Out-String)"
Expand Down Expand Up @@ -148,7 +148,8 @@ function Set-TargetResource

Write-Verbose -Message "Setting configuration of HostedConnectionFilterPolicy for $Identity"

Connect-ExchangeOnline -GlobalAdminAccount $GlobalAdminAccount
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform ExchangeOnline

$HostedConnectionFilterPolicys = Get-HostedConnectionFilterPolicy

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ function Get-TargetResource

Write-Verbose -Message "Getting configuration of HostedContentFilterPolicy for $Identity"

Connect-ExchangeOnline -GlobalAdminAccount $GlobalAdminAccount
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform ExchangeOnline

$HostedContentFilterPolicies = Get-HostedContentFilterPolicy

Expand Down Expand Up @@ -514,7 +515,8 @@ function Set-TargetResource

Write-Verbose -Message "Setting configuration of HostedContentFilterPolicy for $Identity"

Connect-ExchangeOnline -GlobalAdminAccount $GlobalAdminAccount
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform ExchangeOnline

$HostedContentFilterPolicies = Get-HostedContentFilterPolicy

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ function Get-TargetResource

Write-Verbose -Message "Getting configuration of HostedContentFilterRule for $Identity"

Write-Verbose -Message "Calling Connect-ExchangeOnline function:"
Connect-ExchangeOnline -GlobalAdminAccount $GlobalAdminAccount
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform ExchangeOnline

Write-Verbose -Message "Global ExchangeOnlineSession status:"
Write-Verbose -Message "$( Get-PSSession -ErrorAction SilentlyContinue | Where-Object -FilterScript { $_.Name -eq 'ExchangeOnline' } | Out-String)"
Expand Down Expand Up @@ -182,7 +182,8 @@ function Set-TargetResource

Write-Verbose -Message "Setting configuration of HostedContentFilterRule for $Identity"

Connect-ExchangeOnline -GlobalAdminAccount $GlobalAdminAccount
Test-MSCloudLogin -O365Credential $GlobalAdminAccount `
-Platform ExchangeOnline

Write-Verbose -Message "Global ExchangeOnlineSession status:"
Write-Verbose -Message "$( Get-PSSession -ErrorAction SilentlyContinue | Where-Object -FilterScript { $_.Name -eq 'ExchangeOnline' } | Out-String)"
Expand Down
Loading

0 comments on commit abc511d

Please sign in to comment.