Skip to content

Commit

Permalink
Merge pull request #878 from microsoft/Dev
Browse files Browse the repository at this point in the history
Release 1.20.1028.1
  • Loading branch information
NikCharlebois authored Oct 28, 2020
2 parents e6210c0 + 6ac3f0b commit 054e4c2
Show file tree
Hide file tree
Showing 144 changed files with 8,529 additions and 2,666 deletions.
28 changes: 28 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Place your settings in this file to overwrite the default settings
{
"powershell.scriptAnalysis.enable": true,
"powershell.scriptAnalysis.settingsPath": ".vscode/ScriptAnalyzerSettings.psd1",
"powershell.codeFormatting.autoCorrectAliases": true,
"powershell.codeFormatting.useCorrectCasing": true,
"powershell.codeFormatting.openBraceOnSameLine": false,
"powershell.codeFormatting.newLineAfterOpenBrace": false,
"powershell.codeFormatting.newLineAfterCloseBrace": true,
"powershell.codeFormatting.whitespaceBeforeOpenBrace": true,
"powershell.codeFormatting.whitespaceBeforeOpenParen": true,
"powershell.codeFormatting.whitespaceAroundOperator": true,
"powershell.codeFormatting.whitespaceAfterSeparator": true,
"powershell.codeFormatting.ignoreOneLineBlock": false,
"powershell.codeFormatting.alignPropertyValuePairs": true,
"powershell.codeFormatting.preset": "Custom",
"editor.formatOnSave": true,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"node_modules": true,
"markdownissues.txt": true
}
}
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# Change log for Microsoft365DSC

## 1.20.1028.1

* EXOOutboundConnector
* Fixed issue #821
* O365OrgCustomizationSetting
* Fixes an issue where the resource was not being exported;
* O365User
* Added additional information in the error log for when
we try to set an invalid license
* ODSettings
* Removed AD group guid dependency issue # 862
* SPOTenantSettings
* Parameter RequireAcceptingAccountMatchInvitedAccount
is now deprecated (Issue #864)
* SPOSharingSettings
* Fixed issue # 855
* Fixed issue # 866 changed domains to array
* Fixed issue where trying to set anonymous link types if
sharing not properly configured issue #865
* SPOTheme
* Fixed issue where Palette was not being properly extracted as
an array of CIMInstances.
* TeamsTeam
* Added support for visibility HiddenMembership
* MODULES
* M365DSCUtil
* Fixed an issue where function Test-M365DSCObjectHasProperty was missing
(Issue #861)
* M365DSCReverse
* Fixed an issue where passing in the file name and using the GUI for
extraction did not store the file at the specified location (Issue #810)
* Fixed and issue where the -GenerateInfo parameter would always generate
a link to the same resource.
* Added current version module in the Export file.
* MISC
* Added Authentication Type used to the Telemetry Engine.
* DEPENDENCIES
* AzureADPreview Updated to 2.0.2.119
* DSCParser Updated to 1.3.0.0
* Microsoft.Graph.Authentication Updated to 1.1.0
* Microsoft.Graph.Planner Updated to 1.1.0
* Microsoft.PowerApps.Administration.PowerShell Updated
to 2.0.96;

## 1.20.1021.1

* AADTenantDetails
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,26 @@ function Get-TargetResource
}
catch
{
Write-Verbose -Message $_
Add-M365DSCEvent -Message $_ -EntryType 'Error' `
-EventID 1 -Source $($MyInvocation.MyCommand.Source)
try
{
Write-Verbose -Message $_
$tenantIdValue = ""
if (-not [System.String]::IsNullOrEmpty($TenantId))
{
$tenantIdValue = $TenantId
}
elseif ($null -ne $GlobalAdminAccount)
{
$tenantIdValue = $GlobalAdminAccount.UserName.Split('@')[0]
}
Add-M365DSCEvent -Message $_ -EntryType 'Error' `
-EventID 1 -Source $($MyInvocation.MyCommand.Source) `
-TenantId $tenantIdValue
}
catch
{
Write-Verbose -Message $_
}
return $nullReturn
}
}
Expand Down Expand Up @@ -389,6 +406,16 @@ function Test-TargetResource
$CertificateThumbprint
)

#region Telemetry
$ResourceName = $MyInvocation.MyCommand.ModuleName.Replace("MSFT_", "")
$data = [System.Collections.Generic.Dictionary[[String], [String]]]::new()
$data.Add("Resource", $ResourceName)
$data.Add("Method", $MyInvocation.MyCommand)
$data.Add("Principal", $GlobalAdminAccount.UserName)
$data.Add("TenantId", $TenantId)
Add-M365DSCTelemetryEvent -Data $data
#endregion

Write-Verbose -Message "Testing configuration of AzureAD Application"

$CurrentValues = Get-TargetResource @PSBoundParameters
Expand Down Expand Up @@ -478,9 +505,26 @@ function Export-TargetResource
}
catch
{
Write-Verbose -Message $_
Add-M365DSCEvent -Message $_ -EntryType 'Error' `
-EventID 1 -Source $($MyInvocation.MyCommand.Source)
try
{
Write-Verbose -Message $_
$tenantIdValue = ""
if (-not [System.String]::IsNullOrEmpty($TenantId))
{
$tenantIdValue = $TenantId
}
elseif ($null -ne $GlobalAdminAccount)
{
$tenantIdValue = $GlobalAdminAccount.UserName.Split('@')[0]
}
Add-M365DSCEvent -Message $_ -EntryType 'Error' `
-EventID 1 -Source $($MyInvocation.MyCommand.Source) `
-TenantId $tenantIdValue
}
catch
{
Write-Verbose -Message $_
}
return ""
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function Get-TargetResource
$nullReturn.Ensure = "Absent"
try
{
$Policy = Get-AzureADDirectorySetting | Where-Object -FilterScript {$_.DisplayName -eq "Group.Unified"}
$Policy = Get-AzureADDirectorySetting | Where-Object -FilterScript { $_.DisplayName -eq "Group.Unified" }

if ($null -eq $Policy)
{
Expand All @@ -82,9 +82,26 @@ function Get-TargetResource
}
catch
{
Write-Verbose -Message $_
Add-M365DSCEvent -Message $_ -EntryType 'Error' `
-EventID 1 -Source $($MyInvocation.MyCommand.Source)
try
{
Write-Verbose -Message $_
$tenantIdValue = ""
if (-not [System.String]::IsNullOrEmpty($TenantId))
{
$tenantIdValue = $TenantId
}
elseif ($null -ne $GlobalAdminAccount)
{
$tenantIdValue = $GlobalAdminAccount.UserName.Split('@')[0]
}
Add-M365DSCEvent -Message $_ -EntryType 'Error' `
-EventID 1 -Source $($MyInvocation.MyCommand.Source) `
-TenantId $tenantIdValue
}
catch
{
Write-Verbose -Message $_
}
return $nullReturn
}
}
Expand Down Expand Up @@ -151,7 +168,7 @@ function Set-TargetResource
$needToUpdate = $true
}

$Policy = Get-AzureADDirectorySetting | Where-Object -FilterScript {$_.DisplayName -eq "Group.Unified"}
$Policy = Get-AzureADDirectorySetting | Where-Object -FilterScript { $_.DisplayName -eq "Group.Unified" }

if (($Ensure -eq 'Present' -and $currentPolicy.Ensure -eq 'Present') -or $needToUpdate)
{
Expand All @@ -166,7 +183,7 @@ function Set-TargetResource
}
elseif ($Ensure -eq 'Absent' -and $currentPolicy.Ensure -eq 'Present')
{
$Policy = Get-AzureADDirectorySetting | Where-Object -FilterScript {$_.DisplayName -eq "Group.Unified"}
$Policy = Get-AzureADDirectorySetting | Where-Object -FilterScript { $_.DisplayName -eq "Group.Unified" }
Remove-AzureADDirectorySetting -Id $policy.Id
}
}
Expand Down Expand Up @@ -212,6 +229,15 @@ function Test-TargetResource
$CertificateThumbprint
)

#region Telemetry
$ResourceName = $MyInvocation.MyCommand.ModuleName.Replace("MSFT_", "")
$data = [System.Collections.Generic.Dictionary[[String], [String]]]::new()
$data.Add("Resource", $ResourceName)
$data.Add("Method", $MyInvocation.MyCommand)
$data.Add("Principal", $GlobalAdminAccount.UserName)
$data.Add("TenantId", $TenantId)
Add-M365DSCTelemetryEvent -Data $data
#endregion
Write-Verbose -Message "Testing configuration of AzureAD Groups Naming Policy"

$CurrentValues = Get-TargetResource @PSBoundParameters
Expand Down Expand Up @@ -268,11 +294,11 @@ function Export-TargetResource
$dscContent = ''
$ConnectionMode = New-M365DSCConnection -Platform 'AzureAD' -InboundParameters $PSBoundParameters
$Params = @{
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint
IsSingleInstance = 'Yes'
GlobalAdminAccount = $GlobalAdminAccount
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint
IsSingleInstance = 'Yes'
GlobalAdminAccount = $GlobalAdminAccount
}

$Results = Get-TargetResource @Params
Expand All @@ -292,9 +318,26 @@ function Export-TargetResource
}
catch
{
Write-Verbose -Message $_
Add-M365DSCEvent -Message $_ -EntryType 'Error' `
-EventID 1 -Source $($MyInvocation.MyCommand.Source)
try
{
Write-Verbose -Message $_
$tenantIdValue = ""
if (-not [System.String]::IsNullOrEmpty($TenantId))
{
$tenantIdValue = $TenantId
}
elseif ($null -ne $GlobalAdminAccount)
{
$tenantIdValue = $GlobalAdminAccount.UserName.Split('@')[0]
}
Add-M365DSCEvent -Message $_ -EntryType 'Error' `
-EventID 1 -Source $($MyInvocation.MyCommand.Source) `
-TenantId $tenantIdValue
}
catch
{
Write-Verbose -Message $_
}
return ""
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,26 @@ function Get-TargetResource
}
catch
{
Write-Verbose -Message $_
Add-M365DSCEvent -Message $_ -EntryType 'Error' `
-EventID 1 -Source $($MyInvocation.MyCommand.Source)
try
{
Write-Verbose -Message $_
$tenantIdValue = ""
if (-not [System.String]::IsNullOrEmpty($TenantId))
{
$tenantIdValue = $TenantId
}
elseif ($null -ne $GlobalAdminAccount)
{
$tenantIdValue = $GlobalAdminAccount.UserName.Split('@')[0]
}
Add-M365DSCEvent -Message $_ -EntryType 'Error' `
-EventID 1 -Source $($MyInvocation.MyCommand.Source) `
-TenantId $tenantIdValue
}
catch
{
Write-Verbose -Message $_
}
return $nullReturn
}
}
Expand Down Expand Up @@ -289,6 +306,15 @@ function Test-TargetResource
$CertificateThumbprint
)

#region Telemetry
$ResourceName = $MyInvocation.MyCommand.ModuleName.Replace("MSFT_", "")
$data = [System.Collections.Generic.Dictionary[[String], [String]]]::new()
$data.Add("Resource", $ResourceName)
$data.Add("Method", $MyInvocation.MyCommand)
$data.Add("Principal", $GlobalAdminAccount.UserName)
$data.Add("TenantId", $TenantId)
Add-M365DSCTelemetryEvent -Data $data
#endregion
Write-Verbose -Message "Testing configuration of AzureAD Groups Settings"

$CurrentValues = Get-TargetResource @PSBoundParameters
Expand Down Expand Up @@ -364,9 +390,26 @@ function Export-TargetResource
}
catch
{
Write-Verbose -Message $_
Add-M365DSCEvent -Message $_ -EntryType 'Error' `
-EventID 1 -Source $($MyInvocation.MyCommand.Source)
try
{
Write-Verbose -Message $_
$tenantIdValue = ""
if (-not [System.String]::IsNullOrEmpty($TenantId))
{
$tenantIdValue = $TenantId
}
elseif ($null -ne $GlobalAdminAccount)
{
$tenantIdValue = $GlobalAdminAccount.UserName.Split('@')[0]
}
Add-M365DSCEvent -Message $_ -EntryType 'Error' `
-EventID 1 -Source $($MyInvocation.MyCommand.Source) `
-TenantId $tenantIdValue
}
catch
{
Write-Verbose -Message $_
}
return ""
}
}
Expand Down
Loading

0 comments on commit 054e4c2

Please sign in to comment.