There are times when external contacts must be added to your Exchange Online Address Book. You may not want all of your users having access to these contacts. Unfortunately, there is no option in the administration portal to hide them from the Global Address List as there is for internal contacts. However, this can be accomplished rather easily using Windows PowerShell.

7 Steps total

Step 1: Open Windows PowerShell

Click Start > All Programs > Accessories > Windows PowerShell

Note: Right-click Windows PowerShell and select Run as administrator. If you get a user account control prompt that
asks if you would like to continue, respond Continue.

Step 2: Verify PowerShell can run scripts

Run this command:
Get-ExecutionPolicy

Note: If the value returned is anything other than "RemoteSigned", make note of it and proceed to Step 3 to change the value. Otherwise skip to Step 4.

Step 3: Enable Scrpits to run in PowerShell

Run this command:
Set-ExecutionPolicy RemoteSigned

Step 4: Connect PowerShell to the cloud-based service

Run the following commands in order:
1.) $LiveCred = Get-Credential

Note: The above command will open a login window. Enter an Office 365 administrator address and password.

Unfortunately, I do not know. This is the information I found when I was looking how to do this. I only had four or five addresses at the time I needed to hide and this accomplished exactly what I wanted to do, so I did not pursue it any further. I simply put the information into a format I would be able to very easily use again in the future.

You can import them all:
http://community.office365.com/en-us/w/exchange/579.aspxand then use
get-mailcontact | set-mailcontact -HiddenFromAddressListsEnabled $true
I am now trying to figure out if there is a way to take those same contacts and make them show for certain users. Once they are hidden there doesn't seem to be a way to actually use them, might as well delete them at this point. I have them imported to a sharepoint contact list but that only works in outlook, can't use it on the iPhones. The owners kinda panicked when they saw the CEOs of some of the major clients names and email addresses and phone numbers in the GAL...

I have the external contacts hidden as described above and have created distro groups for my users. However, when the users choose the group and expand it, they only see contacts in the group that have not been hidden, This has caused some concern for the users that we have to alleviate by telling them "yes, the email will still go to all the people that should be in the group, even if you cannot see them". I wish there was a better was to "hide" external contacts in the GAL but still allow users to see them when expanding a group.

@RKacz1,
The reason I hid my external contacts was because the contacts are all mobile numbers I added to Distribution Lists to which alerts are sent. My users have no need to know these mobile numbers unless the owner of said number chooses to share it with them.

Why hide the contacts at all if your users know the contacts should be in the Group and are allowed to see them when expanding the Group?

@Oeberon My GAL would double in size if I showed all of the external contacts as well as the internal users. I was trying to keep it clean and not confuse the users seeing all the external contacts mixed in.

@RKacz1,
That makes sense, especially if you have a lot of external contacts.

We never had on-prem Exchange, so I can't speak to that. We migrated to Exchange 365 from an on-prem hMail server (my predecessor was incredibly cheap and, it seems, somewhat unethical as I've found cracked/pirated software installed which I promptly replaced with a valid version.). It was time to replace our mail server and we crunched the numbers: We're a small company and the cost of new hardware was much more expensive than what Exchange 365 would cost us over the life of the new hardware; it would take us 10 years on 365 to spend as much as the new hardware would have cost us.