This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 = ’@’ |