After you run the Enable-RemoteMailbox cmdlet, it fails, and errors show that ExchangeGuid is mandatory…
Remove Address Book Policy with PowerShell in Exchange
You like to remove an Address Book Policy (ABP) with PowerShell in Exchange. Let’s show you the commands that you need. In this article, you learn how to list the ABPs and how to remove that particular policy. What are we waiting for? Let’s start.
Get Address Book Policy
Let’s first get all the Address Book Policies in the organization. Run Exchange Management Shell as administrator. Run the following command.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
[PS] C:\>Get-AddressBookPolicy | Format-Table RunspaceID : 409501a9-8d97-4d23-5158-1e7ab40bdcdf AddressLists : {\All Rooms} GlobalAddressList : \Default Global Address List RoomList : \All Rooms OfflineAddressBook : \Default Offline Address Book IsDefault : False AdminDisplayName : ExchangeVersion : 0.10 (14.0.100.0) Name : Test DistinguishedName : CN=Test,CN=AddressBook Mailbox Policies,CN=alitajran,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=alitajran,DC=local Guid : 79cdd790-f8bb-4d8f-b04e-06e40d5f511f ObjectCategory : alitajran.local/Configuration/Schema/ms-Exch-Address-Book-Mailbox-Policy ObjectClass : {top, msExchRecipientTemplate, msExchAddressBookMailboxPolicy WhenChanged : 15-4-2019 21:46:45 WhenCreated : 28-11-2018 11:06:21 WhenChangedUTC : 15-4-2019 19:46:45 WhenCreatedUTC : 28-11-2018 10:06:21 OrganizationId : Id : Test OriginatingServer : DC01.alitajran.local IsValid : True ObjectState : Unchanged |
Now that we know of the policy named Test, we like to remove it.
Remove Address Book Policy
Run the following command to remove the policy Test and confirm with Y.
1 2 3 4 5 6 |
[PS] C:\>Remove-AddressBookPolicy -Identity "Test" Confirm Are you sure you want to perform this action? Removing address book policy "Test". [Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"): Y |
Address Book Policy is deleted. You can confirm by running the command. This will list all the address book policies in the organization.
1 |
[PS] C:\>Get-AddressBookPolicy |
Conclusion
In this article, you learned how to remove an Address Book Policy with PowerShell in Exchange. If you enjoyed this article, you may like Remove Offline Address Book in Exchange through PowerShell. Don’t forget to follow us and share this article.
This Post Has 0 Comments