Skip to content

Instantly share code, notes, and snippets.

View nicholasdille's full-sized avatar

Nicholas Dille nicholasdille

View GitHub Profile
@nicholasdille
nicholasdille / ConvertTo-Progress.ps1
Created September 8, 2015 08:08
Reads progress information on standard output and displays progress bar
function ConvertTo-Progress {
[CmdletBinding()]
param(
[Parameter(Mandatory,ValueFromPipeline)]
[ValidateNotNullOrEmpty()]
[string[]]
$ProgressText
,
[Parameter()]
[ValidateNotNullOrEmpty()]
Verifying that +nicholasdille is my blockchain ID. https://onename.com/nicholasdille
@nicholasdille
nicholasdille / Test-ReturnFromFunction.ps1
Last active February 4, 2016 20:24
Demonstrated how a PowerShell advanced function behaves when trying to return
function Test-ReturnFromFunction {
[CmdletBinding()]
param(
[switch]
$ReturnFromBegin
,
[switch]
$ReturnFromProcess
,
[switch]

Keybase proof

I hereby claim:

  • I am nicholasdille on github.
  • I am nicholasdille (https://keybase.io/nicholasdille) on keybase.
  • I have a public key whose fingerprint is 6FA7 3A4F 40D9 5BFF 3338 8072 686E 1548 50D2 50F8

To claim this, I am signing this object:

@nicholasdille
nicholasdille / onename.txt
Created February 9, 2017 18:50
Verifying that "nicholasdille.id" is my Blockstack ID. https://onename.com/nicholasdille
Verifying that "nicholasdille.id" is my Blockstack ID. https://onename.com/nicholasdille
@nicholasdille
nicholasdille / PSDSC-ResourceDownloader.ps1
Created January 5, 2015 21:09
Download Script for all #PSDSC Resources on TechNet
param(
[string]$ResourceUrlCacheFile = (Join-Path -Path $PSScriptRoot -ChildPath 'PSDSC-ResourceDownloader.clixml')
,
[switch]$IgnoreCachedUrls = $false
,
[switch]$OverwriteExistingModules = $false
)
if (-Not (Test-Path -Path $ResourceUrlCacheFile) -Or $IgnoreCachedUrls) {
$ModuleList = New-Object System.Collections.ArrayList
@nicholasdille
nicholasdille / ConfigDataPester.ps1
Created November 25, 2015 09:29
Example of #PSDSC using #Pester for validating configuration data
$ConfigurationData = @{
AllNodes = @(
@{
NodeName = 'sql-01'
Roles = @{
Computer = @{
MachineName = 'sql-01'
DomainName = 'example.com'
Credential = 'Svc-Domain-Join@example.com'
}
@nicholasdille
nicholasdille / Reconnect.ps1
Created September 22, 2017 12:40
PowerShell Sessions
$SessionOption = New-PSSessionOption -OutputBufferingMode Drop -IdleTimeout (60*60*2*1000)
Invoke-Command -ComputerName Server2 -SessionOption $SessionOption -InDisconnectedSession -Name MySession
Get-Session
$MySession = Get-Session -ComputerName Server2
Enter-PSSession -Session $MySession
@nicholasdille
nicholasdille / blockstack
Last active March 2, 2019 14:50
blockstack
Verifying my Blockstack ID is secured with the address 1AYDdmU7yydyKtNe6MuhmPEXmvjJaEBeAa https://explorer.blockstack.org/address/1AYDdmU7yydyKtNe6MuhmPEXmvjJaEBeAa
Verifying my Blockstack ID is secured with the address 1AYDdmU7yydyKtNe6MuhmPEXmvjJaEBeAa https://explorer.blockstack.org/address/1AYDdmU7yydyKtNe6MuhmPEXmvjJaEBeAa