Skip to content

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

Notifications You must be signed in to change notification settings

ogie15/Export-DLMB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published