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
#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' |
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
$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 | |
} |
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
[Flags()] enum CertCheckMode { | |
VerifyClientCertRevocation = 0x00000000 | |
VerifyRevocationUsingCacheOnly = 0x00000002 | |
DefaultRevocationFreshnessTimeIsEnabled = 0x00000004 | |
NoUsageCheck = 0x00010000 | |
} | |
[Flags()] enum SslFlags { | |
None = 0x00000000 | |
UseDsMapper = 0x00000001 |
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 Test-ProcessElevated | |
{ | |
[CmdletBinding()] | |
[OutputType([bool])] | |
param ( | |
[Parameter(Mandatory = $true, ValueFromPipeline = $true)] | |
[System.Diagnostics.Process] $Process | |
) | |
begin { |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
class IPSubnet { | |
[ipaddress]$InitialAddress | |
[ValidateRange(0,128)] | |
[int]$SubnetLength | |
# basic constructor | |
IPSubnet([ipaddress]$InitialAddress,[int]$SubnetLength){ | |
$this.InitialAddress = $InitialAddress | |
$this.SubnetLength = $SubnetLength |
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
#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 | |
) |
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 Get-ComputedDependencyGraphUrl { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$true, Position=0 )] | |
[Hashtable]$allDependenciesClean | |
) | |
begin { | |
Write-Verbose "Cmdlet Get-ComputedDependencyGraphUrl - Begin" | |
} |