Skip to content

Instantly share code, notes, and snippets.

View markroloff's full-sized avatar

Mark Roloff markroloff

  • Denver
View GitHub Profile
function Recover-LogSpace {
[CmdletBinding()]
Param(
[parameter(ValueFromPipelineByPropertyName,
Mandatory)]
[string[]]
$SqlServer,
[parameter(ValueFromPipelineByPropertyName)]
[string[]]
@markroloff
markroloff / CalculatedProperty.ps1
Last active May 4, 2018 21:10
Simple calculated property example with explanation.
<#
Let's assume we have a CSV that looks like this
Name
"Ross, Bob"
"Bacon, Kevin"
#>
Import-Csv example.csv | Select-Object Name, Length
@markroloff
markroloff / Get-StringHash.ps1
Last active March 6, 2018 00:59
A simple function for hashing a string of text.
function Get-StringHash {
<#
.SYNOPSIS
Returns the hash for a given string input
.DESCRIPTION
Will hash 1 or more plaintext strings with the specified hashing algorithm.
If no algorithm is specified, MD5 will be used as the default.
Supported algorithms include: MD5, SHA1, SHA256, SHA384, SHA512