Skip to content

Instantly share code, notes, and snippets.

View oising's full-sized avatar
🐢
Taking it easy

Oisin Grehan oising

🐢
Taking it easy
View GitHub Profile
@oising
oising / base_test.ps1
Created August 25, 2023 19:33 — forked from Luiz-Monad/base_test.ps1
how-to-normalize-a-path-in-powershell
# Clear-Host
Import-Module Pester
# New-Item -ItemType Directory 'a/b' -Force -ErrorAction Ignore
# New-Item -ItemType Directory 'c' -Force -ErrorAction Ignore
# New-SmbShare -Name "Shared" -Path "./shared" -FullAccess "Everyone"
$ErrorActionPreference = 'Stop'
$PesterPreference = [PesterConfiguration]::Default
$PesterPreference.Output.StackTraceVerbosity = 'None'
@oising
oising / TaskJob.cs
Created June 1, 2021 22:59 — forked from Stroniax/TaskJob.cs
A PowerShell Job wrapper for System.Threading.Tasks.Task to bridge the gap between asynchronous operations in C# and PowerShell.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;
using System.Threading;
using System.Threading.Tasks;
namespace Casion.PowerShell
{
/// <summary>