Skip to content

Instantly share code, notes, and snippets.

View dustindortch's full-sized avatar

Dustin Dortch dustindortch

View GitHub Profile
@dustindortch
dustindortch / New-EventLog
Created November 5, 2017 16:50
Using the Event Log with PowerShell
New-EventLog -LogName "Provisioning" `
-Source "User Provisioning"
New-EventLog -LogName "Provisioning" `
-Source "Policy Assignment"
New-EventLog -LogName "Provisioning" `
-Source "Licensing"
@dustindortch
dustindortch / Write-EventLog
Created November 5, 2017 16:55
Using the Event Log with PowerShell - Writing Event Log Entries
Write-EventLog -LogName "Provisioning" `
-Source "User Provisioning" `
-EntryType Information -EventId 1000 `
-Message "User provisioned: ${UserPrincipalName}"
@dustindortch
dustindortch / Write-EventLog2
Last active November 7, 2017 19:09
Using the Event Log with PowerShell - Writing Event Log Entries 2
Write-EventLog -LogName "Provisioning" `
-Source "Licensing" `
-EntryType Error -EventId 3300 `
-Message "No licenses available for user: ${UserPrincipalName}"
@dustindortch
dustindortch / Get-EventLog
Last active November 7, 2017 19:09
User the Event Log with PowerShell - Taking Action
Get-EventLog -LogName "Provisioning" `
-Source "User Provisioning" `
-EntryType Information `
-After (Get-DateTime -format %m/%d/%Y)
@dustindortch
dustindortch / Get-EventLog
Created November 5, 2017 16:59
Using the Event Log with PowerShell - Establishing Triggers
Get-EventLog - LogName ${LogName} -Index ${Index}
Get-PublicFolder \NON_IPM_SUBTREE -Recurse | Disable-MailPublicFolder -Confirm:$False
$Folders = Import-Csv .\ExFolders-Export.txt
$Required = $Folders | Where-Object {$_.PR_PF_PROXY_REQUIRED -eq $True}
$Required | Where-Object {$_.ProxyAddresses -NotLike "*@*"}
$Required | Where-Object {$_.ProxyAddresses -NotLike "*@*"} | Get-PublicFolder | Disable-MailPublicFolder -Confirm:$False
@dustindortch
dustindortch / Install-Module_MicrosoftTeams
Last active January 4, 2018 13:08
Install-Module MicrosoftTeams
Install-Module MicrosoftTeams
@dustindortch
dustindortch / JoinedTeams
Created January 4, 2018 13:10
JoinedTeams
/beta/me/joinedTeams