Text
How to Create a Slack Bot without using PoshBot.
If you run Windows 7 or Windows Server 2008 in your environment, PoshBot is not something you can use. This is a chat bot which connects to Slack’s API and retrieves the latest messages.
#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 = ’@’ }
#Creates an array which contains the different channels you have. You can copy $MyBot for each channel.
$BotConfig = @() $BotConfig += $MyBot
#This is a bad name for this method, however, it gets the latest message’s timestamp.
Function GetTimeStamps ($COnfigData,$messages) { foreach ($item in $messages.messages) { if ($item.ts -gt $configdata.lastmessage) { if ($item.ts -gt $configdata.temptimestamp) { $configdata.temptimestamp = $item.ts } } } return $configdata }
Function GetMessage ($info) { $url = “https://slack.com/api/groups.history?token=” + $info.token + “&channel=” + $info.channel + “&pretty=1count=10” $data = Invoke-WebRequest $url -SessionVariable temp #Convert the data to an object $returnData = $data.Content | convertfrom-json return $returnData
} function NewActionMessage { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [PSCustomObject]$Object, [Parameter(Mandatory=$true)] [PSCustomObject]$Message )
if ($object.trigger -like $message.message.substring(0,1) -and $message.message.substring(1) -like “help*”) { SendMessage -token $Object.Token -channel $Object.MessageChannel -opt_username $Object.MyUserName -messagecontent ��Welcome to help” }
}
#This loop will run forever. do { #Loop through all your channels declared earlier. foreach ($Config in $BotConfig) { #Get all messages for the channel. $apimessages = GetMessage($Config) #Store the timestamp for the newest message $c = GetTimeStamps $Config $apimessages $Config.TempTimestamp = $c.TempTimestamp #if the latest message is not set, set it to the last message, therefore nothing will happen on start-up. if ($Config.LastMessage -lt 0.01) { $Config.LastMessage = $c.TempTimestamp } #Loop through all messages foreach ($i in $apimessages.messages) { $text = $I.text $user = $i.user $ts = $i.ts #If the timestamp of the messages pulled from the Slack API are newer than the last message the Bot saw when it last ran if ($ts -gt $Config.LastMessage -and $user -notlike $Config.MyUserName -and $user -ne $null -and $user -ne “”) { #Create an object with the message, user. $TempObject = [PSCustomObject]@{ Message = $text User = $user } $r = NewActionMessage -Object $Config -Message $TempObject } } #Set the newest message from this API call to the last message received. $Config.LastMessage = $c.TempTimestamp Start-Sleep 30 }
} while ($true)
The limitations of this chat bot are that on first run it will not do anything.
@Help is the only command which works
This chat bot calls makes many calls and needs to be created as a scheduled task.
0 notes
Text
Using PowerShell to get your Global Address List into a CSV file - Part 2
As a follow-up to, Using PowerShell to get your Global Address List into a CSV file, there is something wrong with the HiddenFromAddressList attribute in AD.
It seems if you go from Exchange 2003, to 2007, to 2010, the HiddenFromAddressList requires updating and causes the latter report in the earlier post to give false results. The contacts have the correct exchange version, appear on the exchange report, but do not appear in the Outlook Address Book.
0 notes
Text
Using PowerShell to get your Global Address List into a CSV file
Getting your Global Address List is a time consuming task when performed manually. The most efficient method was to add everyone to your contacts and then export to CSV. PowerShell allows us to avoid all that work. Using PowerShell, and this snippet, you can do the following:
#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 foreach ($entry in $entries) {
#Set values from each object $firstname = $entry.getExchangeUser().FirstName $lastname = $entry.getExchangeUser().LastName $email = $entry.getExchangeUser().PrimarySMTPAddress $mobile = $entry.getExchangeUser().MobileNumber $officel = $entry.getExchangeUser().OfficeLocation $jobtitle = $entry.getExchangeUser().JobTitle $officephone = $entry.getExchangeUser().OfficePhone $city = $entry.getExchangeUser().City $state = $entry.getExchangeUser().stateorprovince $postalcode = $entry.getExchangeUser().PostalCode $streetaddress = $entry.getExchangeUser().StreetAddress $company = $entry.getExchangeUser().Company $country = $entry.PropertyAccessor.GetProperty('http://schemas.microsoft.com/mapi/proptag/0x3A26001E')
#Export a for loop to a CSV file $object += New-Object -TypeName PSObject -Property @{ FirstName = $firstname LastName = $lastname Email = $email Mobile = $mobvile OfficeLocation = $officel JobTitle = $jobtitle OfficePhone = $officephone City = $city State = $state PostalCode = $postalcode StreetAddress = $streetaddress Company = $company Country = $Country } | Select-Object FirstName, LastName, Email, Mobile, OfficeLocation, JobTitle, OfficePhone, City, State, PostalCode, StreetAddress, Company, Country
}
#exports object to file or an array to a file $object | export-csv c:\temp\outlookaddresslist.csv -notypeinformation
You need to create a Temp folder on your C: drive for this to work.
Alternatively, if you have access to Exchange, this can be run:
$entries = (Get-GlobalAddressList 'Default Global Address List').RecipientFilter
Get-Recipient -RecipientPreviewFilter $filter | Where-Object {$_.HiddenFromAddressListsEnabled -ne $false} | Select-Object Name,PrimarySmtpAddress, Mobile, OfficeLocation, JobTitle, OfficePhone, City, State, PostalCode, StreetAddress, Company, Country | Export-CSV c:\Temp\ExchangeAddressList.csv -NoTypeInformation
0 notes
Text
The history of the decline in growth of mainstream user-chat applications
ICQ died because you could not see your contacts on a new computer. MSN died because of a lack of video and audio chat. Skype died because of the inability to seamlessly continue conversations across two devices. BBM died because of platform lockdown. Why will Facebook Messenger, WhatsApp, and Kik fail?
0 notes
Text
Why BlackBerry Will Win AKA My Thoughts on Mobile Device Management
BlackBerry is going to be successful if other's do not copy their strengths. BlackBerry Devices BlackBerry competes in the devices market. They sell the BlackBerry Z10, Q10, Q5, Z30. Their Z30 has a large screen and long battery life. BlackBerry Software Blackberry OS is BlackBerry's custom operating system running on their devices. BlackBerry Enterprise Service 10 BlackBerry provides the enterprise service as a way to manage devices for employees. Integration of Services BlackBerry has been updating it's software at a rapid pace. They have also been adding features to the BES services. Further, they are releasing more devices. All this signals boom or bust. Windows Phone, Android and iPhone clients rely on third parties such as Cisco, G.O.O.D, and AirWatch in order to manage their devices. Windows Phone uses Active Sync, however, this only provides secure e-Mail, Contacts, and Calendar. Samsung, HTC, Dell and other licensees are reliant on what Google and Windows build into their software. The hardware cannot provide a feature the software cannot provide. The third parties such as AirWatch, G.O.O.D, and Cisco do not build their own devices making them reliant on the hardware and software providers. iOS does not provide services similar to AirWatch, G.O.O.D, Cisco. Why care about AIrWatch, G.O.O.D, and Cisco The MDM providers are important because data on the devices is important. All the MDM providers allow you to install an application on your phone which will hold all your documents in a secure container. This will help in preventing access to your data from applications installed using the Play Store, iTunes, Windows Store, and BlackBerry Store. What BlackBerry lacks Applications are not lacking. Well, they are, in the AppWorld, however, you can install any Android application by opening the .APK file. BlackBerry software is lacking many features Android is offering currently but they are improving. BlackBerry Enterprise Services does not work with Windows and currently does not run Android applications. This probably will change if they want to gain market share. BlackBerry hardware isn't as good as everyone else and this Mini-HDMI out is now irrelevant. What BlackBerry does well BlackBerry Work and Personal are going to be a delight for end users in years to come. This allows employees to keep their personal data separated from the corporate. Securing data for both employees and businesses. BlackBerry Hub makes the BlackBerry OS device more efficient. BlackBerry integrates Enterprise Service, OS 10, and their devices in a form their competitors do not, currently. BlackBerry potential BlackBerry BBM for corporate is something we need to see. It needs to let you use BBM Voice, Video for BBM Contacts and international/local phone numbers. It should also integrate with your e-Mail and be come your IM Client + Phone and Push to Talk Device. Lastly, it should really run on Desktop [1] I meant to post this a few months ago.. BBM Protected is just launching. [2] I am invested in BBRY
0 notes
Text
Blackberry Z10: First Impressions, Review
Swiping up on the BlackBerry Z10 is the equivalent of using the home button on your iPhone, a safety net of some sort. If there is one thing you should know about the new Z10, it would be how to swipe up. The phone will trap in you in applications. You will be hunting for the exit/back/cancel/close button but you will have to settle for swiping up. Hardware The device hardware seems somewhat dated, but that was to be expected. The hardware on this device would have been amazing for a 2012 Q1 release, but for a 2012 Q4 release, dated is appropriate. The screen is nice and isn't an eye soar to look at in the sun. The hardware feel is pretty awesome, almost reminds you of the 9780 back cover. The screen is somewhat long but not thick enough. I would have preferred the screen to be somewhat wider, but not as long. Alternatively, the keyboard could have had a space in the middle so it wouldn't be too challenging to reach across the keys. First Look After unboxing the device and plugging in the battery, yes the battery is detachable so you can carry a spare instead of having to run around looking for A/C ports, the first real test begins. The first boot time on the BlackBerry is about 1 minute. When it first loads a software update is available. I don't know if my wireless is really that bad or it's their phone but the update wouldn't load over Wifi, I had to use 4mb of my data package. If you wipe the phone then you will have to download the 4MB update again which is kind of crazy. The opening tutorial is badly designed/coded. Moving through the tutorial requires you to swipe to the left, but they don't give you an option to test the feature they are trying to highlight. Swiping left barely works in the tutorial screen or has some sort of delay which is really annoying because I just want to see the home screen at this point. Software The first step for me was to load my ActiveSync connected inbox. The prompt to add an exchange account doesn't appear until you fail to add an e-mail. After the error message, click advanced to configure your e-mail. The e-mail configuration screen doesn't have a back/cancel button so the minute you hit next be ready to do a power cycle to get out of the screen. Edit: Someone recommended swiping 5 times diagonally from the bottom right to the top left when stuck in a menu. I cannot confirm this as the device isn't with me at the moment. Once the e-mail is loaded getting into your workflow is somewhat efficient. You can access your e-mail, bbm, text messages, and social networks from the hub on the left. Swiping to the left repeatedly takes you to the hub. The hub doesn't give you access to calls/notes, nor can you add the option to show the notes/calls/tasks to your hub menu. The UX of the device needs work. The back/cancel buttons aren't the same throughout the applications. Some applications have the back button at the top, others at the bottom. Some do not have a back button so you have to swipe up to get out of the app, which takes you to them main screen instead of the last place you were before entering the application that you swiped out of. For example, if you swipe across to the settings menu and pick a sub option the lack of a back button forces you to swipe up. Once you swipe up you end up on the main home screen tab instead of the settings tab so you have to scroll back to get to the main settings menu. The top menu from the old BlackBerry devices which allowed you easy access to Mobile Network, Wireless Configuration, Bluetooth, NFC, and Hotspot are no more. You have to pull down at the top, click settings, navigate to network connections in order to manage a network connection. Wireless point is a hassle also as you cannot sort them by open/closed networks, more money for the carriers. By default the NFC option is enabled, and set to send data. The default setting for mobile network roaming is set to off. The hotspot works impressively. All the LED options are gone. You cannot set the number of times a phone call will vibrate, the number of flashes for a bbm message versus a phone call. The clock lets you set a single alarm, similar to the older BlackBerry's. The side button can only be used for voice recognition but I would rather have a camera option or anything else like a browser really. The phone doesn't come with any pre-loaded music or videos so you have to test with your own media, I consider this a positive as less bloatware but some might not. Lastly, the Maps option doesn't work without GPS being enabled. Keyboard One of the two innovative features are the keyboard and the Hub. The keyboard is pretty impressive for numerous reasons. First, you can flick words. The option appears in landscape or portrait mode. The flickable words are fairly accurate in terms of what you are thinking. The word at the top left is usually the most accurate. The downside is that you cannot change the font size or colour for the words which are being recommended. Secondly, typing on the keyboard is fairly effective. If you hit S instead of A regularly it will start to move it's strike zones to better recognize your keyboard inputs. The keyboard is a little long in landscape mode, and I would prefer an option to split the keyboard in the middle. Hub The hub is a great idea. I am shocked some Android app hasn't cleverly copied it and made it more efficient. I connected my e-mail, text, and BBM to it. The view is nice. Swiping to the far left gives you a menu of all the connected applications in your Hub. It doesn't let you manually add other applications from your phone. For example, you cannot add Remember Me, the new notes/tasks, into your Hub as a connected application. Flowing between the Hub BBM message and the BBM application isn't efficient either.Reading e-mails is effective, images render well, and resizing isn't needed. Adding notes from inside an e-mail is a challenge. Getting out of the Hub is a swipe upwards, or a swipe to the left. With all the hype around the Hub I would say it has potential. All the flaws are software issues where the UX seemed like an after thought. Rating I would rate this phone as a really good phone on the market. I would think the next line of the Z10 will be a beast in terms of hardware. With regards to software I hope there are several releases coming soon in order to fix some of the quirks in their software. Also, a lot of positives weren't mentioned such as the way the Z10/PlayBook interact, the output of the mini-HDMI port, and the quality of 1080p/30 playback. Don't try 1080p/60 it won't work. The BlackBerry browser has always sucked and will always suck so look for an alternative. The lack of a built in feed reader makes me think BlackBerry has forgot who their market was, or are looking to the twitter/facebook social media market heavily. The BlackBerry logo on the front of the phone really shines in the sun and is an annoyance. I haven't been able to crash the device yet. You can multitask, and it is really efficient.
2 notes
·
View notes
Text
We Need Trolls
Trolls are the bane of your existence.
In Internet slang, a troll is someone who posts inflammatory, extraneous, or off-topic messages in an online community, such as an online discussion forum, chat room, or blog, with the primary intent of provoking readers into an emotional response or of otherwise disrupting normal on-topic discussion. The noun troll may refer to the provocative message itself, as in: "That was an excellent troll you posted."
Some trolls resort to flaming.
Flaming, also known as bashing, is hostile and insulting interaction between Internet users, often involving the use of profanity. Flaming usually occurs in the social context of an Internet forum, Internet Relay Chat (IRC), Usenet, by e-mail, game servers such as Xbox Live or Playstation Network, and on video-sharing websites. It is frequently the result of the discussion of heated real-world issues such as politics, religion, and philosophy, or of issues that polarise subpopulations, but can also be provoked by seemingly trivial differences.
Every community needs trolls. If your place of business encourages interaction and thoughtful discussion, Reddit, emotions get high, people get heated and thoughts become weapons. Users argue over topics and try to find common ground. Trolls chime and derail the thread.
They are annoying. They are ruthless. They are lonely. They have no friends. They spend all day staring at a screen looking to bully people. They lack awareness about the individuals they are involved with. They lack feeling. They don't care. They crave attention. We need them to bring the community closer.
Let the trolls speak but don't feed/pet the animals (see troll).
side: I wonder if any of those fake reddit accounts were right-wing trolls.
0 notes
Text
Dead Links: The Internet Where Links Disappear
Our subscription readers sort by the latest story. We read it, check it off but never look at it again. We might share the article and someone might read it but what are the odds that traffic goes through to that article in five days? We sort our Facebook timeline using the newest post date, our Twitter feeds show the latest tweets, a Youtube video doesn't go viral if it doesn't have an insane number of hits in the early hours. Content owners are forced to repost a message multiple times, change the title and provide multiple links to the same content all to get older content some love.
I find forums and news websites started to contribute to this phenomena. Forums locked threads after several months of inactivity. I can understand that from an organizational standpoint to keep the board clean instead new threads are made about the same topics. Wouldn't it be better for a moderator to be able to see the change in opinions on a thread over time? I do. News websites are also to blame. They want to protect their content, I understand it. One of the newspapers that Google filters me towards is The Toronto Star. You have to save the content in order to access it in the future because the link dies after a certain amount of time. You cannot access the article without a subscription. It's a good business model to force people to pay you but it also discourages users to look for an older article. It hurts your user experience and SEO!
My first experience with this was when I was first started blogging. I noticed whenever I posted an article traffic levels were encouraging. If the post was really useful and had a few shares on social networks it gained views for the first few days but then faded to obscurity. Some new users would cycle through the site and visit older articles. I had to do internal linking to get returning users to visit the older articles. I couldn't deep link to many sources of information because their links would die within a few weeks. Do I really want to edit every single blog post with new links every month? I don't have the time.
Encourage websites to make their content available for a longer period of time.
Similar article scripts for current posts
Promoting old articles in feeds
Internal linking to older articles
How do we bring people back to old links. Maybe we need to pretend the links are dead and have a funeral for them to get the crowd back.
1 note
·
View note