Skip to content

Instantly share code, notes, and snippets.

View mitchellurgero's full-sized avatar

Mitchell Urgero mitchellurgero

View GitHub Profile
@mitchellurgero
mitchellurgero / search.ps1
Created May 31, 2018 21:18
Search Exchange 2013/2016 for emails and put into a PST file (Powershell!)
# Search All mailbox's on the server:
Get-mailboxserver -identity "SERVERNAME" | search-mailbox -searchquery "Search query as you would type it in Outlook" -targetmailbox "USERNAMEOFTARGETMAILBOX" -TargetFolder "NEWFOLDERTOPUTSEARCHIN" -loglevel full
# Search One mailbox on the server:
search-mailbox -Identity "USERNAME" -searchquery "Search query as you would type it in Outlook" -targetmailbox "USERNAMEOFTARGETMAILBOX" -TargetFolder "NEWFOLDERTOPUTSEARCHIN" -loglevel full
# Explination:
# USERNAMEOFTARGETMAILBOX - The mailbox the search results will be pulled into. (E.G: administrator)
@mitchellurgero
mitchellurgero / SearchExchangeMailBox.ps1
Created June 26, 2018 21:39
Search mailbox in Exchange 2013/2016 for keywords, save to a targetMailbox then export PST.
# Search Mailbox's for given keywords
#
# Make sure the targetMailbox exists, if the folderName folder does not that will be created automatically.
#
#
# Made by Mitchell Urgero
#
#