Skip to content

Instantly share code, notes, and snippets.

View mattfromit's full-sized avatar

Matt Williams mattfromit

View GitHub Profile
@aaldrich29
aaldrich29 / Send-SlackMessage.ps1
Created April 22, 2016 14:31
Send Slack Message from PowerShell
function Send-SlackMessage {
# Add the "Incoming WebHooks" integration to get started: https://slack.com/apps/A0F7XDUAZ-incoming-webhooks
param (
[Parameter(Mandatory=$true, Position=0)]$Text,
$Url="https://hooks.slack.com/services/xxxxx", #Put your URL here so you don't have to specify it every time.
# Parameters below are optional and will fall back to the default setting for the webhook.
$Username, # Username to send from.
$Channel, # Channel to post message. Can be in the format "@username" or "#channel"
$Emoji, # Example: ":bangbang:".
$IconUrl # Url for an icon to use.
@altrive
altrive / Test-RebootRequired.ps1
Last active August 3, 2023 14:34
Check pending reboot on local computer
#Based on <http://gallery.technet.microsoft.com/scriptcenter/Get-PendingReboot-Query-bdb79542>
function Test-RebootRequired
{
$result = @{
CBSRebootPending =$false
WindowsUpdateRebootRequired = $false
FileRenamePending = $false
SCCMRebootPending = $false
}
@adhipg
adhipg / countries.sql
Created January 12, 2012 11:41
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;