Skip to content

Instantly share code, notes, and snippets.

View krzydoug's full-sized avatar

Doug Maurer krzydoug

  • Software Consulting Services
View GitHub Profile
@JustinGrote
JustinGrote / ScreenConnect.psm1
Last active February 28, 2024 07:50
ScreenConnect Client
#requires -version 7
using namespace Microsoft.PowerShell.Commands
using namespace System.Text
$ErrorActionPreference = 'Stop'
#Suppress useless IRM Verbose output
$PSDefaultParameterValues['Invoke-RestMethod:Verbose'] = $false
$PSDefaultParameterValues['Invoke-WebRequest:Verbose'] = $false
$DebugPreference = 'SilentlyContinue'
@mdgrs-mei
mdgrs-mei / TerminalSpinner.ps1
Created June 15, 2023 14:43
Show spinner on the Windows Terminal tabs for every command.
$global:originalPSConsoleHostReadLine = $function:global:PSConsoleHostReadLine
$global:originalPrompt = $function:global:Prompt
$function:global:PSConsoleHostReadLine = {
$startProgressIndicator = "`e]9;4;3;50`e\"
$command = $originalPSConsoleHostReadLine.Invoke()
$startProgressIndicator | Write-Host -NoNewLine
$command
}
@jborean93
jborean93 / HttpSslCert.ps1
Created April 1, 2022 01:35
Create pwsh wrapper for netsh.exe http add|delete|show sslcert
[Flags()] enum CertCheckMode {
VerifyClientCertRevocation = 0x00000000
VerifyRevocationUsingCacheOnly = 0x00000002
DefaultRevocationFreshnessTimeIsEnabled = 0x00000004
NoUsageCheck = 0x00010000
}
[Flags()] enum SslFlags {
None = 0x00000000
UseDsMapper = 0x00000001
@0xfeeddeadbeef
0xfeeddeadbeef / Test-ProcessElevated.ps1
Last active November 30, 2023 04:02
Test whether or not a process is elevated (UAC run as admin)
function Test-ProcessElevated
{
[CmdletBinding()]
[OutputType([bool])]
param (
[Parameter(Mandatory = $true, ValueFromPipeline = $true)]
[System.Diagnostics.Process] $Process
)
begin {
@jhoneill
jhoneill / Chrome Databases.ipynb
Last active March 10, 2024 21:12
Exploring data saved by Chrome/Edge/Any Chromium (passwords done in another Gist)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@purplemonkeymad
purplemonkeymad / IPSubnet
Created March 5, 2020 16:16
Powershell class for subnet calculation.
class IPSubnet {
[ipaddress]$InitialAddress
[ValidateRange(0,128)]
[int]$SubnetLength
# basic constructor
IPSubnet([ipaddress]$InitialAddress,[int]$SubnetLength){
$this.InitialAddress = $InitialAddress
$this.SubnetLength = $SubnetLength
@JustinGrote
JustinGrote / Get-NetworkDeviceConfig.ps1
Created June 22, 2018 20:56
Get the running configuration from a network device using Powershell. Supports Cisco and JunOS
#requires -module Posh-SSH
param (
[Parameter(Mandatory,ValueFromPipeline,ValueFromPipelineByPropertyName)][String]$Computername,
[ValidateSet("Cisco","JunOS")]
[Parameter(ValueFromPipelineByPropertyName)][String]$DeviceType = "Cisco",
[String]$RepositoryPath = $home\desktop,
[PSCredential]$Credential
)
@alan-null
alan-null / UnicornDependencyGraphGenerator.ps1
Last active January 29, 2023 13:39
Generate unicorn dependency graph using PowerShell. Analyse and improve your configurations or easily fix existing issues
function Get-ComputedDependencyGraphUrl {
[CmdletBinding()]
param(
[Parameter(Mandatory=$true, Position=0 )]
[Hashtable]$allDependenciesClean
)
begin {
Write-Verbose "Cmdlet Get-ComputedDependencyGraphUrl - Begin"
}