Skip to content

Instantly share code, notes, and snippets.

Matt Matticusau

Block or report user

Report or block Matticusau

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Matticusau
Matticusau / get-sqldemos.ps1
Created Jun 13, 2018
Clone and extract Sql Server Samples for demos
View get-sqldemos.ps1
# clone the repo
git clone -n https://github.com/Microsoft/sql-server-samples .\sql-server-samples
# check out the repo so you can use the demo files
cd sql-server-samples
git config core.sparsecheckout true
echo samples/features/* | out-file -append -encoding ascii .git/info/sparse-checkout
echo samples/demos/*| out-file -append -encoding ascii .git/info/sparse-checkout
git checkout
@Matticusau
Matticusau / SqlVersionsApi-HealthCheckScript-Example.ps1
Last active Jun 8, 2018
Example SQL Health Check script for querying the SQL Versions API for life cycle support information
View SqlVersionsApi-HealthCheckScript-Example.ps1
# Example script for using the SQL Versions API to check the life cycle and support information of a particular SQL Version
# Further information here -> http://blog.matticus.net/2018/06/new-sql-version-life-cycle-tool.html
# Live data example of a single instance
# Import the SQL Module
# NOTE: In July 2016 a new module was released therefore there are two methods of this now
# https://blogs.technet.microsoft.com/dataplatforminsider/2016/06/30/sql-powershell-july-2016-update/
# Method 1: Module as part of SQL Setup.exe
@Matticusau
Matticusau / choco-setup-windows-tools.ps1
Last active Apr 20, 2018
Chocolatey install script for my common packages on Windows Server
View choco-setup-windows-tools.ps1
<#
Author: Matt Lavery
Date: 12/04/2018
Purpose: Provides a script to install Chocolatey and my common packages for Windows Servers
Major Version: 0.1.0
Disclaimer: This script is provided "AS IS".
History
When Version Who What
-----------------------------------------------------------------
View ConvertPPTtoPDF.ps1
# adapted from https://gist.github.com/ap0llo/05cef76e3c4040ee924c4cfeef3f0b40
# Powershell script to export Powerpoint Presentations to pdf using the Powerpoint COM API
# Based on a VB script with the same purpose
# http://superuser.com/questions/641471/how-can-i-automatically-convert-powerpoint-to-pdf
function Export-Presentation
{
View ConvertTo-Markdown.ps1
<#
.Synopsis
Converts a PowerShell object to a Markdown table.
.EXAMPLE
$data | ConvertTo-Markdown
.EXAMPLE
ConvertTo-Markdown($data)
.EXAMPLE
Invoke-ScriptAnalyzer -Path C:\MyScript.ps1 | Select-Object -Property RuleName,Line,Severity,Message | `
ConvertTo-Markdown | Out-File C:\MyScript.ps1.md
@Matticusau
Matticusau / FindFilesWithRegEx.ps1
Created May 8, 2017
Find files with contents matching a RegEx pattern
View FindFilesWithRegEx.ps1
$searchPath = (Get-Location).Path;
$searchRegEx = 'find this text'
Get-ChildItem -Path $searchPath -Recurse -File | % {if ((Get-Content -Path $PSItem.FullName | Out-String) -match $searchRegEx) {Write-Host $PsItem.FullName -ForegroundColor Red} else {Write-Host $PsItem.FullName -ForegroundColor green}}
@Matticusau
Matticusau / README-Template.md
Last active Mar 21, 2017
A README.md template that I use for my repositories to simplify development environment setup
View README-Template.md

ProjectName

A description of the project

System Requirements

  • WMF (PowerShell) 5.0
  • Windows Server 2012 R2, Windows 10 or greater

Required PowerShell Modules

The following PowerShell modules.

You can’t perform that action at this time.