I hereby claim:
- I am thomasrayner on github.
- I am mrthomasrayner (https://keybase.io/mrthomasrayner) on keybase.
- I have a public key ASCAv3uoc7TNonQ5H0dVugQ0aVrmFI9TAQTs6593LxRSXAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
javascript:(function(){var a=document.createElement('style'),b;document.head.appendChild(a);b=a.sheet;b.insertRule('a[role=link] div[aria-label]::after{content:attr(aria-label);display:block;background-color:rgba(0,0,0,.8);color:#fff;font-family:\'Segoe UI\',-apple-system,BlinkMacSystemFont,Roboto,Oxygen-Sans,Ubuntu,Cantarell,\'Helvetica Neue\',sans-serif;padding:.5em;position:absolute;top:50%;left:0;right:0;z-index:1}',0);b.insertRule('a[role=link] div[aria-label][style*=margin-left]::after{left:60%}',0);b.insertRule('[dir=auto]>svg{display:none}',0);b.insertRule('a[role=link] div[aria-label]{display:contents;margin-top:unset !important;margin-bottom:unset !important}',0);})(); |
$forePromptColor = 0 | |
[System.Collections.Generic.List[ScriptBlock]]$global:PromptRight = @( | |
# right aligned | |
{ "$FG;${er}m{0}" -f $LeftArrow } | |
{ "$FG;${forePromptColor}m$BG;${er}m{0}" -f $(if (@(get-history).Count -gt 0) {(get-history)[-1] | % { "{0:c}" -f (new-timespan $_.StartExecutionTime $_.EndExecutionTime)}}else {'00:00:00.0000000'}) } | |
{ "$FG;7m$BG;${er}m{0}" -f $LeftArrow } | |
{ "$FG;0m$BG;7m{0}" -f $(get-date -format "hh:mm:ss tt") } | |
) |
workflow Test3 { | |
param ( | |
[parameter()] | |
[String]$Number | |
) | |
Start-Sleep -Seconds 10 | |
if ($Number -eq 'One') { | |
return 1 | |
} |
<# | |
This is a PowerShell function wrapping the ADMT executable to abstract out migrating Active Directory users. | |
Read all the ADMT docs, and all the code and comments below before considering using this : ) | |
The COM object was covered nicely by Jan Egil Ring: | |
http://blog.powershell.no/2010/08/04/automate-active-directory-migration-tool-using-windows-powershell/ | |
Unfortunately, the COM object does not support Include files, a critical requirement for us. |
$false -eq '' | |
'' -eq $false | |
$true -eq '' | |
'' -eq $true | |
$false -eq $null | |
$true -eq $null | |
$null -eq $true | |
$null -eq $false | |
'' -eq $null | |
$null -eq '' |
iex "$((iwr 'https://gist.githubusercontent.com/devblackops/3f82f3f435a9bcca1cd1da6f18474cd2/raw/365c96c4f2ff5d99ddea9db84f72ed6e07182234/Get-MonitorDetail.ps1').Content)"; Get-MonitorDetail -ErrorAction 0 |
if ( -not $env:ConEmuPID ) { | |
function global:prompt { | |
$E = "$([char]27)" | |
$F = "$E[38;5" | |
$B = "$E[48;5" | |
"$B;255m$F;0mI $F;1m$([char]9829) $F;0mPS $F;0m$B;255m$([char]8250)$E[0m " | |
} | |
} | |
else { | |
[List[ScriptBlock]]$global:Prompt = @( |
#Contents of MyFile.csv | |
# | |
#To,Subject,Body | |
#firstguy@fake.tld,subject1,<p>body</p> | |
#secondguy@fake.tld,subject2,<i>italic body</i> | |
$csvContents = Import-Csv MyFile.csv | |
$defaultEmailParams = @{ | |
'SmtpServer' = 'EmailRelay' | |
'BodyAsHtml' = $true |