A description of the project
- WMF (PowerShell) 5.0
- Windows Server 2012 R2, Windows 10 or greater
The following PowerShell modules.
Fiscal Calendar = | |
// based on https://guyinacube.com/2018/02/13/power-bi-date-table-create-using-dax/ | |
VAR BaseCalendar = CALENDAR("01/01/2010", "01/01/2025") | |
RETURN | |
GENERATE( | |
BaseCalendar, | |
VAR BaseDate = [Date] | |
VAR YearDate = Year(BaseDate) | |
VAR MonthNumber = MONTH(BaseDate) | |
VAR FiscalYearLong = IF (MonthNumber <= 6, INT(FORMAT(BaseDate, "yyyy")), INT(FORMAT(BaseDate, "yyyy")) + 1) |
# 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 |
# 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 |
<# | |
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 | |
----------------------------------------------------------------- |
# 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 | |
{ |
<# | |
.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 |
$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}} |