File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Modules/CippExtensions/Public/Sherweb Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,13 @@ function Test-SherwebMigrationAccounts {
77 $Table = Get-CIPPTable - TableName Extensionsconfig
88 $Config = ((Get-CIPPAzDataTableEntity @Table ).config | ConvertFrom-Json ).Sherweb
99 # First get a list of all subscribed skus for this tenant, that are in the transfer window.
10- $Licenses = (Get-CIPPLicenseOverview - TenantFilter $TenantFilter ) | ForEach-Object { $_.terminfo = ($_.terminfo | ConvertFrom-Json - ErrorAction SilentlyContinue) ; $_ } | Where-Object { $_.terminfo -ne $null -and $_.terminfo.TransferWindow -LE 78 }
10+ $Licenses = (Get-CIPPLicenseOverview - TenantFilter $TenantFilter ) | ForEach-Object { $_.terminfo = ($_.terminfo | ConvertFrom-Json - ErrorAction SilentlyContinue) ; $_ } | Where-Object { $_.terminfo -ne $null -and $_.terminfo.TransferWindow -LE 7 }
1111
1212 # now check if this exact count of licenses is available at Sherweb, if not, we need to migrate them.
1313 $SherwebLicenses = Get-SherwebCurrentSubscription - TenantFilter $TenantFilter
1414 $LicencesToMigrate = foreach ($License in $Licenses ) {
1515 foreach ($termInfo in $License.terminfo ) {
16- $matchedSherweb = $SherwebLicenses | Where-Object { $_.quantity -eq 3 -and $_.commitmentTerm.termEndDate -eq $termInfo.NextLifecycle }
16+ $matchedSherweb = $SherwebLicenses | Where-Object { $_.quantity -eq $termInfo .TotalLicenses -and $_.commitmentTerm.termEndDate -eq $termInfo.NextLifecycle }
1717 if (-not $matchedSherweb ) {
1818 [PSCustomObject ]@ {
1919 LicenseName = ($Licenses | Where-Object { $_.skuId -eq $License.skuId }).license
You can’t perform that action at this time.
0 commit comments