Skip to content

Instantly share code, notes, and snippets.

View darrenjrobinson's full-sized avatar

Darren Robinson darrenjrobinson

View GitHub Profile
@darrenjrobinson
darrenjrobinson / Password.ps1
Last active February 2, 2016 05:58
MIMUsrPlacementPSMA-Password
# intentionally left blank
@darrenjrobinson
darrenjrobinson / Import.ps1
Last active February 2, 2016 06:08
MIMUsrPlacementPSMA-Import
param (
$Username,
$Password,
$OperationType,
[bool] $usepagedimport,
$pagesize
)
#Needs reference to .NET assembly used in the script.
@darrenjrobinson
darrenjrobinson / Export.ps1
Last active February 2, 2016 06:13
MIMUsrPlacementPSMA-Export
param
(
$username,
$password,
$Credentials,
$ExportType
)
begin
{
@darrenjrobinson
darrenjrobinson / Password.ps1
Created March 21, 2016 04:30
MIMSPOUserProfilePSMA-Password
# intentionally left blank
@darrenjrobinson
darrenjrobinson / Schema.ps1
Last active March 29, 2016 01:13
MIMCSVviaEWSPSMA
$obj = New-Object -Type PSCustomObject
$obj | Add-Member -Type NoteProperty -Name "Anchor-StaffID|String" -Value "U123456"
$obj | Add-Member -Type NoteProperty -Name "objectClass|String" -Value "user"
$obj | Add-Member -Type NoteProperty -Name "GivenName|String" -Value "Firstname"
$obj | Add-Member -Type NoteProperty -Name "Surname|String" -Value "LastName"
$obj | Add-Member -Type NoteProperty -Name "PreferredName|String" -Value "Joe"
$obj | Add-Member -Type NoteProperty -Name "MiddleName|String" -Value "Jay"
$obj | Add-Member -Type NoteProperty -Name "Department|String" -Value "Marketing"
$obj | Add-Member -Type NoteProperty -Name "Title|String" -Value "Marketing Manager"
$obj | Add-Member -Type NoteProperty -Name "State|String" -Value "NSW"
@darrenjrobinson
darrenjrobinson / Import.ps1
Last active March 29, 2016 01:33
MIMCSVviaEWSPSMA
param (
$Username,
$Password,
$Credentials,
$OperationType,
$NBDomain = "ADDomain",
$MailboxName = "newstaffreports@customer.com.au",
$pageupsender = "reports-out@saas.provider.com",
$downloadDirectory = "\\fileserver\appshare$\SaaSReports",
$EWSURI=[system.URI] "https://webmail.customer.com.au/ews/Exchange.asmx",
@darrenjrobinson
darrenjrobinson / Export.ps1
Created March 29, 2016 01:34
MIMCSVviaEWSPSMA
# not implemented
@darrenjrobinson
darrenjrobinson / SecurePassword.ps1
Last active June 23, 2016 05:55
SecurePassword
$PlainPassword = "SuperSecure!" | ConvertTo-SecureString -AsPlainText -Force
$BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($PlainPassword)
$PlainPassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)
Write-Host "Password is: " $PlainPassword
@darrenjrobinson
darrenjrobinson / GetAzureADPSPreview.ps1
Last active July 26, 2016 01:10
GetAzureADPSPreview
# Get the ADAL Lib as part of the AzureAD Module Preview
# (Requires Windows Mgmt Framework 5 https://www.microsoft.com/en-us/download/details.aspx?id=50395 )
Install-Module -Name AzureADPreview -RequiredVersion 1.1.143.0
# Get the ADAL Lib as part of the AzureAD Module Preview
# (Requires Windows Mgmt Framework 5 https://www.microsoft.com/en-us/download/details.aspx?id=50395 )
Install-Module -Name AzureADPreview -RequiredVersion 1.1.143.0