I'm reading a document at work that involves a bunch of position titles, but I don't know who the people actually are, I only know their job titles.
I know this information is available in the Global Address Book, but I don't know how to put in a job title (and I guess location) and get back an actual person's name and contact information.
Is it possible to use powershell to "almost" look up a contact in the GAL using a job title as an input and the contact as an output?
o365 of course...
As for ...
... the simple answer, yes. You just write the code for it, just as you would if this was on-premises Exchange, of course using the Exchange Online cmdlets via a PSRemote session.
Connection to EXO us a daily use case and fully documented as to how, from Microsoft here: Connect to Exchange Online PowerShell
Or just use this script from the MS PowerSHellGallery.com
https://www.powershellgallery.com/packages/Connect-O365/1.5.4/Content/Connect-O365.ps1
Or this one
https://gallery.technet.microsoft.com/office/Connect-to-Office-53f6eb07/file/221497/1/Connect-Office365Services.ps1
Yet, remember the GAL is populated from AD. So, if you are in a hybrid environment, you can just hit your on-premises AD to get this.
You have a built in cmdlet for user searches for AD and EXP/EXO:
You can also use the ADAC to write this code for you, it's just a matter of clicking through the steps and saving the code to modify as needed. Follow these instructions.
Introduction to Active Directory Administrative Center Enhancements (Level 100)
Learning PowerShell with Active Directory Administrative Center (PowerShell History Viewer)
Step-By-Step: Utilizing PowerShell History Viewer in Windows Server 2012 R2
Use Active Directory Administrative Center to Create PowerShell Commands in Windows Server 2012