We are using a cloud GAL Sync solution that will sync users from multiple O365 tenants into each others GAL as contacts so all the orgs can have a single GAL. This works great for O365, but since this info does not sync back down to the local AD environments, we cannot see these contacts on devices like Multi-Function Printers unless they sync down to AD.
I have a draft script below that will import Contacts from O365 down to my local AD (Still working on stored credential security). It work fine when every fields in the CSV exported from O365 is populated, but when it hits a blank field it does not import that record.
I need a way to have the Import-Csv command ignore blanks
(After I get this working I will break it up into several steps to check for existing contacts and do an update instead)
...