Skip to content

Commit 8044ab8

Browse files
authored
Merge pull request #234 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents fd097aa + cd24286 commit 8044ab8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardGroupTemplate.ps1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function Invoke-CIPPStandardGroupTemplate {
3030
param($Tenant, $Settings)
3131
##$Rerun -Type Standard -Tenant $Tenant -Settings $Settings 'GroupTemplate'
3232

33-
If ($Settings.remediate -eq $true) {
33+
if ($Settings.remediate -eq $true) {
3434
#Because the list name changed from TemplateList to groupTemplate by someone :@, we'll need to set it back to TemplateList
3535
$Settings.groupTemplate ? ($Settings | Add-Member -NotePropertyName 'TemplateList' -NotePropertyValue $Settings.groupTemplate) : $null
3636
Write-Host "Settings: $($Settings.TemplateList | ConvertTo-Json)"
@@ -42,11 +42,11 @@ function Invoke-CIPPStandardGroupTemplate {
4242
$email = if ($groupobj.domain) { "$($groupobj.username)@$($groupobj.domain)" } else { "$($groupobj.username)@$($Tenant)" }
4343
$CheckExististing = New-GraphGETRequest -uri 'https://graph.microsoft.com/beta/groups?$top=999' -tenantid $tenant | Where-Object -Property displayName -EQ $groupobj.displayname
4444
$BodyToship = [pscustomobject] @{
45-
'displayName' = $groupobj.Displayname
46-
'description' = $groupobj.Description
47-
'mailNickname' = $groupobj.username
48-
mailEnabled = [bool]$false
49-
securityEnabled = [bool]$true
45+
'displayName' = $groupobj.Displayname
46+
'description' = $groupobj.Description
47+
'mailNickname' = $groupobj.username
48+
mailEnabled = [bool]$false
49+
securityEnabled = [bool]$true
5050
}
5151
if ($groupobj.groupType -eq 'AzureRole') {
5252
$BodyToship | Add-Member -NotePropertyName 'isAssignableToRole' -NotePropertyValue $true
@@ -58,7 +58,7 @@ function Invoke-CIPPStandardGroupTemplate {
5858
}
5959
if (!$CheckExististing) {
6060
$ActionType = 'create'
61-
if ($groupobj.groupType -in 'Generic', 'azurerole', 'dynamic') {
61+
if ($groupobj.groupType -in 'Generic', 'azurerole', 'dynamic', 'Security') {
6262
$GraphRequest = New-GraphPostRequest -uri 'https://graph.microsoft.com/beta/groups' -tenantid $tenant -type POST -body (ConvertTo-Json -InputObject $BodyToship -Depth 10) -verbose
6363
} else {
6464
if ($groupobj.groupType -eq 'dynamicdistribution') {

version_latest.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.5.1
1+
7.5.2

0 commit comments

Comments
 (0)