Skip to content

Instantly share code, notes, and snippets.

View davegreen's full-sized avatar

Dave Green davegreen

View GitHub Profile
@davegreen
davegreen / Connect-ExchangeOnline.ps1
Last active April 12, 2018 13:00
Function for connecting to an Exchange Online session. Useful in a PowerShell profile script.
function Connect-ExchangeOnline {
<#
.Synopsis
A function that connects to the Exchange online system.
.Parameter Credential
A credential object with rights to connect to the Exchange server. This parameter is mandatory.
.Parameter AllowClobber
Boolean value of whether the imported session will clobber existing commands. Defaults to True.
@davegreen
davegreen / Connect-Services.ps1
Last active April 12, 2018 13:01
Functions for connecting to and importing PowerShell sessions for Lync, Exchange (online and on-premise).
Function Test-MsolConnection {
<#
.Synopsis
A function that tests the Microsoft Online connection.
.Example
Test-MsolConnection
Tests to see if the Microsoft Online connection is available.
@davegreen
davegreen / Set-IdentityManagementGalAdPermission.ps1
Last active October 1, 2021 09:07
This function sets the AD permissions required for MIM to perform GALSync operations. It does this by adding the required new permissions for the GALSync group to AD.
Function Set-IdentityManagementGalAdPermission {
<#
.Synopsis
A function that sets the permissions in Active Directory (AD) required for Microsoft Identity Manager (MIM) to perform Global Address List (GAL) sync operations.
.Description
This function sets the AD permissions required for MIM to perform GALSync operations. It does this by adding the required new permissions for the GALSync group to at least three places in the AD.
The GALSync group requires permissions to AD for the following:
@davegreen
davegreen / OSDComputerName.ps1
Last active April 3, 2024 22:27
Altered script from http://www.scconfigmgr.com/2013/10/02/prompt-for-computer-name-during-osd-with-powershell/ to improve computer name validation - Originally by Nickolaj
Function Load-Form
{
$Form.Controls.Add($TBComputerName)
$Form.Controls.Add($GBComputerName)
$Form.Controls.Add($ButtonOK)
$Form.Add_Shown({$Form.Activate()})
[void] $Form.ShowDialog()
}
Function Set-OSDComputerName