Skip to content

Instantly share code, notes, and snippets.

View scriptingstudio's full-sized avatar
👍
Awake and ready

Matthew Gray scriptingstudio

👍
Awake and ready
  • Interstellar Systems
  • Hiranyaloka
View GitHub Profile
@scriptingstudio
scriptingstudio / hyperlink.md
Last active May 17, 2026 11:28
Work around for buggy WPF Hyperlink

Coming soon

Ps2exe.NET is an educational project to go deep C#/WPF/VisualStudio.
Ps2exe.NET is a graphical dashboard to convert PowerShell scripts to standalone executables.

Key Features:

  • No setup, no external dependencies, pure C#/WPF
  • Source compressor & encoder
  • Automatic variables in your PS script: $ScriptRoot, $ScriptName, $RtMode
  • There is a PowerShell counterpart of the Ps2exe.NET — ps2exec.ps1
@scriptingstudio
scriptingstudio / ProtectedString.cs
Created April 19, 2026 18:13
Experimental C# string encryptor
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Cryptography;
using System.Text.RegularExpressions;
namespace Encryption
{
public class Encryption //: IDisposable
{
@scriptingstudio
scriptingstudio / ProtectedString.ps1
Created April 19, 2026 06:57
Experimental encryption module for simple cases.
<#
.SYNOPSIS
Encrypt/decript strings.
.DESCRIPTION
AIO encryption dotsource mini-module.
The module supports AES and DPAPI encryption methods.
.FUNCTIONALITY
Encryption method: Protect-String
Decryption method: UnProtect-String
Data method: Get-CipherData
@scriptingstudio
scriptingstudio / Compress-ScriptBlock.ps1
Last active March 20, 2026 07:15
Simple PowerShell script compressor. The script works like "ConvertTo-Json -Compress". Two editions: System.Management.Automation.PSParser and System.Management.Automation.Language.Parser
<#
.SYNOPSIS
Removes comments and extra white space from an input PS script.
.DESCRIPTION
The filters omit white space and indented formatting in the output. Filters are comments, newlines, spaces, statement separator (;).
.PARAMETER Path
Specifies the path to the PS file to compress.
.PARAMETER ScriptBlock
Specifies the PowerShell scriptblock to compress.
.PARAMETER NoTest
@scriptingstudio
scriptingstudio / ps2exec.ps1
Last active May 9, 2026 08:50
PS2EXE script deeply refactored replacing outdated techniques and overloaded logics with modern look and feel. Source compressor added to reduce output size. Source encoding, the return of the king. Implemented as a dotsource module.
#Requires -Version 5
# Insipred by and credits to PS2EXE by Markus Scholts (https://github.com/MScholtes/PS2EXE)
# Deeply refactored original code replacing outdated techniques and overloaded logics with modern look and feel. Source compressor added to significantly reduce output size. Source encoding, the return of the king. Full backward compatibility provided.
<#
.SYNOPSIS
Converts powershell scripts to standalone executables.
.DESCRIPTION
Converts powershell scripts to standalone executables. GUI output and input is activated with one switch, real windows executables are generated. You may use the graphical counterpart Ps2exedotNet for convenience.
@scriptingstudio
scriptingstudio / compare-array.ps1
Last active February 21, 2026 13:14
Yet another PS object fast comparer (2 editions)
function Compare-Array {
[CmdletBinding()]
[alias('Compare-Object2','Compare-ObjectFast')]
param (
[Parameter(Position=0)]
[psobject[]] $ReferenceObject,
[Parameter(Position=1)]
[psobject[]] $DifferenceObject,
[switch] $IncludeEqual,
[switch] $ExcludeDifferent
@scriptingstudio
scriptingstudio / Get-FolderItem.ps1
Last active February 19, 2026 07:37
Fast File Finder. Lists all files under a specified folder regardless of character limitation on path depth. Based on Robocopy.
<#
Virtual multifunction via single function without additional parameters
Get-FolderItem - list files
Remove-FolderItem - delete files
Copy-FolderItem - copy files
Move-FolderItem - move files
#>
function Get-FolderItem {
[cmdletbinding(DefaultParameterSetName='Filter')]
[alias('Remove-FolderItem','Copy-FolderItem','Move-FolderItem')] #,'rfi','cfi','mfi','gfi'
@scriptingstudio
scriptingstudio / slmgr-ps.ps1
Created February 4, 2026 06:47
SLMGR PowerShell workshop/framework to explore Windows activation management
#Requires -Version 5
<#
.SYNOPSIS
Windows Software Licensing Management Tool
.DESCRIPTION
SLMGR PowerShell workshop/framework to explore Windows activation management.
This is a ported slmgr.vbs script.
.NOTES
- Prerelease prototype
@scriptingstudio
scriptingstudio / filelocktester.ps1
Last active January 1, 2026 18:14
Simple File Lock Tester
function Test-FileLock ([string]$Path, [int]$TimeOutMs, [int]$Count) {
$timeout = $TimeOutMs
if ($timeout -lt 0) {$timeout = 0}
if ($Count -gt 0) {$Count--} else {$Count = 0}
do {
try {
$OFile = [System.IO.FileInfo]::new($Path)
$OStream = $OFile.Open([System.IO.FileMode]::Open, [System.IO.FileAccess]::ReadWrite, [System.IO.FileShare]::None)
if ($OStream) {$OStream.Close()}
return $false