Giter VIP home page Giter VIP logo

Comments (3)

grahamr975 avatar grahamr975 commented on June 20, 2024

@AisaacOcean If you have a list of your user's emails, you can manually pass those in a list to the -MailboxList parameter

from ews-office365-contact-sync.

philipfredberg avatar philipfredberg commented on June 20, 2024

Hi @AisaacOcean,

I tried passing a list to -MailboxList parameter, via this command (Get-Content -Path "file.txt") however is says vaule is empty.
If i run Get-Content -Path "file.txt" alone, it works and it has worked in you script before, can you perhaps tell me how to correctly pass the list?

from ews-office365-contact-sync.

TheMechanicX32 avatar TheMechanicX32 commented on June 20, 2024

@AisaacOcean @grahamr975

I made a few changes to your powershell script that may be useful.

I had the same issue, couldn't figure out how to filter out shared mailboxes. After pouring through MS docs and your code, I found it will work if you make the following modification in Get-GALContacts.ps1:

image

Here is the modified script in a format that can be pasted:

$ContactList = Get-User -Filter "(RecipientTypeDetails -eq 'UserMailbox')" -ResultSize unlimited | Select-Object DisplayName,FirstName,LastName,Title,Office,WindowsEmailAddress,Phone

There are a bunch of filter parameters you can use. Here is a complete list from the Microsoft Documentation:

  • DiscoveryMailbox
  • DynamicDistributionGroup
  • EquipmentMailbox
  • GroupMailbox (Exchange 2013 or later and cloud)
  • GuestMailUser (Exchange 2016 or later and cloud)
  • LegacyMailbox
  • LinkedMailbox
  • LinkedRoomMailbox (Exchange 2013 or later and cloud)
  • MailContact
  • MailForestContact
  • MailNonUniversalGroup
  • MailUniversalDistributionGroup
  • MailUniversalSecurityGroup
  • MailUser
  • PublicFolder
  • PublicFolderMailbox (Exchange 2013 or later and cloud)
  • RemoteEquipmentMailbox
  • RemoteRoomMailbox
  • RemoteSharedMailbox
  • RemoteTeamMailbox (Exchange 2013 or later and cloud)
  • RemoteUserMailbox
  • RoomList
  • RoomMailbox
  • SchedulingMailbox (Exchange 2016 or later and cloud)
  • SharedMailbox
  • SharedWithMailUser (cloud only)
  • TeamMailbox (Exchange 2013 or later and cloud)
  • UserMailbox

Make sure you include the -ExcludeSharedMailboxContacts in your batch script.

from ews-office365-contact-sync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.