Skip to content

Latest commit

 

History

History
66 lines (39 loc) · 2.12 KB

README.md

File metadata and controls

66 lines (39 loc) · 2.12 KB

Export-DLMB

This CMDLET Exports Members in a Distribution List and Mail Enabled Security Group


Kindly Note

This works for Exchange Online


Download the Export-DLMB.psm1 Module

Open PowerShell (Run As Administrator) then run this CMDLET $env:PSModulePath to check for directories

Save it in a Folder named Export-DLMB in either of the directories listed by the output of above CMDLET

Example of list of directories are below

  • C:\Users\Admin\Documents\PowerShell\Modules

  • C:\Program Files\PowerShell\Modules

  • c:\program files\powershell\7-preview\Modules

  • C:\Program Files\WindowsPowerShell\Modules

  • C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules

  • c:\Users\Admin.vscode\extensions\ms-vscode.powershell-2020.3.0\modules


How to run CMDLET

Open PowerShell (Run As Administrator)

First Connect to Exchange Online using PowerShell

For More assitance with connecting to Exchange Online vist LINK

Run Import-Module -Name Export-DLMB to import the module

Then Run this CMDLET to check if the Module has been Imported Get-Module -Name Export-DLMB

After importing the module run the CMDLET below to get help on how to use the Export-DLMB CMDLET

Get-Help -Name "Export-DLMB" -Full


EXAMPLE IS BELOW

EXAMPLE
    Export-DLMB "C:\Users\Public"
    =============================
    Export-DLMB -LocationPath "C:\Users\Public"
    ===========================================
    Export-DLMB -LocationPath "C:\Users\Public" -FileName "myfile"
    ==============================================================
    Export-DLMB -LP "C:\Users\Public" -FN "myfile"
NOTES
    For this to run you will need to connect to Exchange Online via PowerShell
    If no value is entered for parameter FileName a default file "DL&MESGMembers.csv" is created

☺️ for further inquiries reach out to Ogie