Skip to content

Instantly share code, notes, and snippets.

View mobernberger's full-sized avatar

Michael Obernberger mobernberger

  • Austria
  • 10:39 (UTC +02:00)
View GitHub Profile
@mobernberger
mobernberger / exo-block-basic-auth.ps1
Created December 2, 2019 06:36
This set of commands creates a new authentication policy
#Connect to Exchange Online Powershell before running this commands.
#Create a new authentication policy which blocks all basic authentication
New-AuthenticationPolicy -Name "Block Basic Auth"
#Set the policy to all users and force it immediately enable by reset the refresh token.
Get-Recipient -RecipientTypeDetails UserMailbox -ResultSize Unlimited | Set-User -AuthenticationPolicy "Block Basic Auth" -STSRefreshTokensValidFrom $([System.DateTime]::UtcNow)
#Define the policy as default for your organization
Set-OrganizationConfig -DefaultAuthenticationPolicy "Block Basic Auth"
#Connect to Exchange Online Powershell before running this commands.
Get-AdminAuditLogConfig | Set-AdminAuditLogConfig -AdminAuditLogAgeLimit 365
@mobernberger
mobernberger / exo-deleted-items-30days.ps1
Last active November 24, 2019 08:09
Exchange Online - Retain Deleted Items Configuration
#Connect to Exchange Online Powershell before running this commands.
#Set the retention period for all Mailbox plans in the tenant to 30 days. This setting applies to new and newly migrated mailboxes
Get-MailboxPlan | Set-MailboxPlan -RetainDeletedItemsFor 30
#Set the retention period for all existing mailboxes to 30 days
Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox')} | Set-Mailbox -RetainDeletedItemsFor 30
@mobernberger
mobernberger / gist:a95b4b5578361e8ddc0fc580b8a5b79f
Last active November 23, 2019 18:40
Upload Custom iOS XML IMAP configuration via Intune Graph API
<#
.COPYRIGHT
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
See LICENSE in the project root for license information.
Added XML and JSON configuration and UPN parameter by Michael Obernberger
Version: 1.0
Date: 12.03.2019
@mobernberger
mobernberger / ReadMe
Last active August 29, 2015 14:12
netmftwilio
This is a quick implementation of the Twilio REST Api to send a message from the .NET Micro Framework.
You have the TwilioAccount Class, then the TwilioClient itself, which takes the parameter for the FROM Number, TO Number and the Body. The final File is a quick Test implementation.