Skip to content

Commit 5c2696f

Browse files
Merge branch 'dev' of https://github.com/CyberDrain/CIPP into dev
Synced from CyberDrain/CIPP@2ac7c35
1 parent e8e8e0b commit 5c2696f

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

Modules/CIPPCore/Public/Invoke-CIPPSharePointTemplateDeploy.ps1

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,10 @@ function Invoke-CIPPSharePointTemplateDeploy {
120120
Headers = $Headers
121121
APIName = $APIName
122122
}
123-
# Team site vs Communication — select may persist {label,value}; default Team for
124-
# older templates that omit sharePointTemplate.
125-
$RawSharePointTemplate = [string]($SiteTemplate.sharePointTemplate.value ?? $SiteTemplate.sharePointTemplate)
126-
$SiteParams.TemplateName = if ($RawSharePointTemplate -in @('Team', 'Communication')) {
127-
$RawSharePointTemplate
123+
# Team site vs Communication — createAs may persist {label,value}; default Team.
124+
$RawCreateAs = [string]($SiteTemplate.createAs.value ?? $SiteTemplate.createAs)
125+
$SiteParams.TemplateName = if ($RawCreateAs -in @('Team', 'Communication')) {
126+
$RawCreateAs
128127
} else {
129128
'Team'
130129
}

0 commit comments

Comments
 (0)