Skip to content

Instantly share code, notes, and snippets.

@jpremji
jpremji / gist:0db35816362d20c7afd805aad02e0d54
Created August 3, 2018 02:35
Outlook GAL (Global Address List) Export
#initialize the Outlook application
[Microsoft.Office.Interop.Outlook.Application] $outlook = New-Object -ComObject Outlook.Application
#store all values from the default GAL to $entries
$entries = $outlook.Session.GetGlobalAddressList().AddressEntries
#declare array outside of the loop
$object = @()
#loop through all entries retrieved
@jpremji
jpremji / Slackbot.ps1
Created August 3, 2018 02:33
Slackbot
#Declare object of the Channel
$MyBot = [PSCustomObject]@{
LastMessage = [decimal] 0
Channel = ‘A212’ #This needs to be set
Token = ‘token-1’ #This needs to be set
Count = '10’
TempTimestamp = [decimal] 0
MyUserName = [string] “MyBot”
MessageChannel = 'W11’
Trigger = ’@’