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-AvailableLicenseTemplates { | |
[CmdletBinding()] | |
param () | |
process { | |
Write-Host "`$PSScriptRoot:" $PSScriptRoot -ForegroundColor Green | |
# Define the parent directory containing the folders | |
$ParentDirectory = "$PSScriptRoot\..\Templates\LICENSE\" | |
# Get the list of folders | |
$Folders = Get-ChildItem -Path $ParentDirectory -Directory |
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 Scan-LOLDrivers { | |
param( | |
[Parameter(Mandatory = $true)] | |
[string]$path | |
) | |
Add-Type -TypeDefinition @" | |
using System; | |
using System.Security.Cryptography; | |
using System.Security.Cryptography.X509Certificates; |
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
using System.Collections; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Diagnostics.CodeAnalysis; | |
using System.Globalization; | |
using System.Linq; | |
using System.Management.Automation.Internal; | |
using System.Management.Automation.Language; | |
using System.Runtime.CompilerServices; | |
using System.Text.RegularExpressions; |
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
$MyObject = "" |Select-Object _prop1,_prop2 | |
$MyObject |Add-Member -Name Prop1 -MemberType ScriptProperty -Value {return $this._prop1} -SecondValue {param([int]$value) $this._prop1 = $value} | |
$MyObject |Add-Member -Name Prop2 -MemberType ScriptProperty -Value {return $this._prop2} -SecondValue {param([int]$value) $this._prop2 = $value} | |
$MyObject |Add-Member -Name SumProperties -MemberType ScriptMethod -Value { return $this.Prop1 + $this.Prop2 } | |
$MyObject.Prop1 = 3 | |
$MyObject.Prop2 = 2 | |
$MyObject.SumProperties() |
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 3 | |
####################################################### | |
#region SyntaxISEr #################################### | |
## Function Invoke-SyntaxISEr | |
## BackBone Tool for Invoke-CyberISEr - Exported (?) | |
<# | |
.Synopsis | |
ISE ScriptPane Explorer |
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-RSFileHash { | |
<# | |
.Synopsis | |
Returns an MD5 filehash when given a file path | |
.DESCRIPTION | |
Returns an MD5 filehash when given a file path | |
.EXAMPLE | |
Get-RSFileHash -Filename c:\temp\filetohash.txt | |
.EXAMPLE | |
Get-ChildItem c:\temp\*.txt | get-rsfilehash |
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 New-ToastNotification | |
{ | |
param( | |
[Parameter(Mandatory=$true)] | |
[string]$Title, | |
[Parameter(Mandatory=$false)] | |
[string[]]$Message, | |
[Parameter(Mandatory=$false)] |
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
param([Parameter(Position = 0)][string] $Path = 'C:\Users\grave\Downloads\ChessData-master\') | |
$code = @{ | |
Name = 'ResultCounter' | |
Namespace = 'ChessData' | |
PassThru = $true | |
UsingNamespace = @( | |
'System.Collections.Concurrent', | |
'System.IO', | |
'System.Threading.Tasks' | |
) |
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
# | |
# Ping-Forever.ps1 | |
# | |
# Modified version of alexinnes/ConstantPingToServer.ps1 (https://gist.github.com/alexinnes/b2076c88700020af3963) | |
# | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$true)] | |
[string]$ComputerName, | |
[string]$LogDirectory = 'C:\ping logs\' |
NewerOlder