- aaron-bond.better-comments
- alefragnani.project-manager
- AwesomeAutomationTeam.azureautomation
- bierner.emojisense
- bierner.markdown-checkbox
- codespaces-contrib.codeswing
- codezombiech.gitignore
- CoenraadS.bracket-pair-colorizer-2
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 Watch-BitsTransfer { | |
[CmdletBinding()] | |
Param ( | |
[Parameter(Mandatory = $true)] | |
[guid]$JobId | |
) | |
$perc = 0 | |
while ($perc -le 100 ) { | |
$jobState = Get-BitsTransfer -JobId $JobId | Select-Object BytesTransferred, BytesTotal | |
$percentCompleteState = ($jobState.BytesTransferred / $jobState.BytesTotal * 100) |
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
$objects = (0..273) | |
$batchValue = 20 | |
$result = New-Object System.Collections.ArrayList | |
$id = 1 | |
for ($i = 0; $i -lt $objects.Count; $i += $batchValue) { | |
$start = $i + 1 | |
$end = ($i + 19) -gt $objects.Count ? $objects.count : $i + 19 | |
$progressParams = @{ | |
Activity = "Testing.." | |
Status = "Processing batch $start - $end of $($objects.count)" |
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
if ($PSVersionTable.PSEdition -ne "Core") { | |
if ($myInvocation.Line) { | |
&"$env:ProgramFiles\PowerShell\7\pwsh.exe" -NonInteractive -executionPolicy Bypass -NoProfile $myInvocation.Line | |
} | |
else { | |
&"$env:ProgramFiles\PowerShell\7\pwsh.exe" -NonInteractive -executionPolicy Bypass -NoProfile -file "$($myInvocation.InvocationName)" $args | |
} | |
exit $lastexitcode | |
} |
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
A few handy detection functions that I use every day |
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
$script:tick = [char]0x221a | |
$hashPath = "$env:SystemDrive\hwhash.csv" | |
function Install-PreReq { | |
[cmdletbinding()] | |
param ( | |
[Parameter(Mandatory = $true)] | |
[string[]]$reqs, | |
[Parameter(Mandatory = $false)] | |
[ValidateSet('Module', 'Script')] |
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
// Place this at the bottom of the "schemes" array in your profiles.json for the win. | |
{ | |
"background": "#2d2a2e", | |
"black": "#2d2a2e", | |
"blue": "#FC9867", | |
"brightBlack": "#727072", | |
"brightBlue": "#FC9867", | |
"brightCyan": "#78DCE8", | |
"brightGreen": "#a9dc76", | |
"brightPurple": "#AB9DF2", |
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 ConvertFrom-Base64EncodedString { | |
[cmdletbinding()] | |
param ( | |
[string]$encodedString | |
) | |
try { | |
$decodedOutput = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($encodedString)) | |
return $decodedOutput | |
} | |
catch { |
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
{"lastUpload":"2020-09-23T13:04:03.524Z","extensionVersion":"v3.4.3"} |
NewerOlder