Skip to content

Instantly share code, notes, and snippets.

View Crosse's full-sized avatar
💭
Git along, little doggie.

Seth Wright Crosse

💭
Git along, little doggie.
View GitHub Profile
#!/usr/bin/env bash
set -euf -o pipefail
repo="$1"
gitea_server=your.server.here
apiToken="gitea_api_token"
uid="gitea_uid"
<#
.SYNOPSIS
Removes messages matching a search query from all mailboxes in Exchange.
.DESCRIPTION
Removes messages matching a search query from all mailboxes in Exchange. This script is simply a wrapper
around Search-Mailbox adding the ability to break up mailbox searches into smaller batches. In fact,
it can be argued that unless you really want progress reports throughout the process, you should probably
just use Search-Mailbox instead.
<#
.SYNOPSIS
Performs operations in a restartable fashion against Office365.
.DESCRIPTION
This script takes care of ensuring that connections to Office365 are valid
before processing mailboxes, will automatically reconnect to Office365 when
the session is broken, and allows an administrator to "recover" to either a
specific two-letter username prefix or continue from a specific mailbox when
the process dies.
@Crosse
Crosse / keybase.md
Last active September 7, 2016 01:27

Keybase proof

I hereby claim:

  • I am crosse on github.
  • I am crosse (https://keybase.io/crosse) on keybase.
  • I have a public key ASDElRWKPT-46YvEnsYDdzeyDqKyTxM2awo03pDZW9cS_wo

To claim this, I am signing this object: