Wednesday 10 June 2015

Exchange 2013: Remove-AddressList & Remove-GlobalAddressList Error

Remove-AddressList and Remove-GlobalAddressList fail with the following error:

The operation couldn't be performed because object 'Example Address List' couldn't be found on
'dc.domain.local'.
    + CategoryInfo          : NotSpecified: (:) [Remove-AddressList], ManagementObjectNotFoundException
    + FullyQualifiedErrorId : [Server=mbx01,RequestId=1a7a7002-1586-485c-a292-cfb5caf2ba4b,TimeStamp=10/06/2015 14
   :26:49] [FailureCategory=Cmdlet-ManagementObjectNotFoundException] B73B9C56,Microsoft.Exchange.Management.SystemCo
  nfigurationTasks.RemoveAddressList
    + PSComputerName        : mbx01.domain.local

The issue may be caused by spaces within the address list name so to remove retrieve the GUID for the address list:

Get-AddressList | Select Identity,Guid | ft Identity,Guid
Remove-AddressList 3b3bda61-4761-42c4-ac5a-1da27c3097fc


Get-GlobalAddressList | Select Identity,Guid | ft Identity,Guid
Remove-GlobalAddressList 03a1080e-7d1a-4502-b82c-b9572df57ba5

No comments:

Post a Comment