if (!$CreateSharedConfiguration) { $sysMbx = $null; $name = "SystemMailbox{8cc370d3-822a-4ab8-a926-bb94bd0641a9}"; $dispName ...

if (!$CreateSharedConfiguration)          {              $sysMbx = $null;              $name = "SystemMailbox{8cc370d3-822a-4ab8-a926-bb94bd0641a9}";              $dispName = "SystemMailbox{8cc370d3-822a-4ab8-a926-bb94bd0641a9}";              Write-ExchangeSetupLog -Info ("Getting mailbox with Name=$name.");              $mbxs = @(Get-Mailbox -AuditLog -DomainController $RoleDomainController -Organization  $RoleOrganizationHierarchicalPath -Filter {Name -eq $name});              if ($mbxs.Length -eq 0)              {                $upn = $name + "@" + $RoleTenantDomainName;                Write-ExchangeSetupLog -Info ("Creating mailbox with UPN=$upn,Name=$name,DisplayName=$dispName.");                $sysMbx = New-Mailbox -Organization $RoleOrganizationHierarchicalPath -Name $name -DisplayName $dispName -UserPrincipalName $upn -AuditLog -OverrideRecipientQuotas -DomainController $RoleDomainController;              }              else              {                Write-ExchangeSetupLog -Info ("Retrieved mailbox with Name=$name.");                if ($mbxs[0].DisplayName -ne $dispName)                {                  Write-ExchangeSetupLog -Info ("Setting DisplayName=$dispName.");                  Set-Mailbox -AuditLog -Identity $mbxs[0] -DisplayName $dispName -Force -DomainController $RoleDomainController;                }                $sysMbx = $mbxs[0];              }              if ($sysMbx -eq $null)              {                Write-ExchangeSetupLog -Info ("Cannot find audit log mailbox with name=$name for organization=$RoleOrganizationHierarchicalPath");              }          }          else          {            Write-ExchangeSetupLog -Info ("Ignore creating mailbox $name.");          }
English
English (United States)
Español (España)
Spanish (Spain)