This is a collection of resources that I have bookmarked with regards to speaking at conferences.
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
# Eg. User name="admin", Password="admin" for this code sample. | |
$user = "admin" | |
$pass = "admin" | |
# Build auth header | |
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $user, $pass))) | |
# Set proper headers | |
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" | |
$headers.Add('Authorization', ('Basic {0}' -f $base64AuthInfo)) |
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
Import-Module -Name Toolbox | |
Import-Module -Name Microsoft.PowerShell.UnixCompleters | |
Import-Module -Name Terminal-Icons | |
function BackOne { | |
Set-Location .. | |
} | |
function BackTwo { | |
Set-Location ../.. | |
} |
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
HelpUri : https://go.microsoft.com/fwlink/?LinkID=113308 | |
ResolvedCommandName : Get-ChildItem | |
DisplayName : gci -> Get-ChildItem | |
ReferencedCommand : Get-ChildItem | |
ResolvedCommand : Get-ChildItem | |
Definition : Get-ChildItem | |
Options : ReadOnly | |
Description : | |
OutputType : {System.IO.FileInfo, System.IO.DirectoryInfo} | |
Name : gci |
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
function Get-RandomAdilioSticker { | |
[CmdletBinding()] | |
param () | |
begin { | |
$results = irm -Uri 'https://api.github.com/repos/adilio/ps-design/git/trees/master?recursive=1' | |
} | |
process { | |
start ("{0}/{1}" -f 'https://raw.githubusercontent.com/adilio/ps-design/master', ($results.tree | ? path -match 'png$' | Get-Random | Select-Object -ExpandProperty path)) |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<style> | |
body { |
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
using namespace System.Collections.Specialized | |
Get-ChildItem -Path C:\support\git\gitpersonal | Select-Object -ExpandProperty FullName | | |
function Split-FolderPath { | |
[CmdletBinding()] | |
param ( | |
[Parameter(ValueFromPipeline)] | |
[string[]] | |
$Path |
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
using namespace System.Net | |
using namespace System.Management.Automation | |
# Input bindings are passed in via param block. | |
param ( | |
$Request, | |
$TriggerMetadata | |
) | |
# Write to the Azure Functions log stream. |
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
function Get-MultiPass { | |
<# | |
.SYNOPSIS | |
Retrieves a previously created MultiPass file | |
.DESCRIPTION | |
Retrieves a previously created MultiPass file from the specified Path | |
.PARAMETER Path | |
Specifies a path to the location of a credential XML file. |
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
function Get-Syntax { | |
[CmdletBinding()] | |
param ( | |
$Command, | |
[switch] | |
$Normalise | |
) | |
$check = Get-Command -Name $Command |