Skip to content

Instantly share code, notes, and snippets.

View equelin's full-sized avatar

Erwan Quélin equelin

View GitHub Profile
@nohwnd
nohwnd / Uninstall-Pester.ps1
Last active March 14, 2024 13:57
Remove built-in version of Pester 3 (or -All) from Windows 10 Program Files and Program Files (x86).
#Requires -RunAsAdministrator
function Uninstall-Pester ([switch]$All) {
if ([IntPtr]::Size * 8 -ne 64) { throw "Run this script from 64bit PowerShell." }
#Requires -RunAsAdministrator
$pesterPaths = foreach ($programFiles in ($env:ProgramFiles, ${env:ProgramFiles(x86)})) {
$path = "$programFiles\WindowsPowerShell\Modules\Pester"
if ($null -ne $programFiles -and (Test-Path $path)) {
if ($All) {
@mtboren
mtboren / ExampleSnippetsForGettingAPITypeDefs.ps1
Created March 3, 2017 14:43
Getting EMC Unity array API types' definitions from API itself
## URI is to just get the "types" info
$tmpUri = "https://someunity.dom.com/api/types"
## this example uses the websession and headers from already having established connection to Unity API (as perfomed by Connect-Unity cmdlet from "Unity-PowerShell" PS module)
$oWebResponse = Invoke-WebRequest -Uri $tmpURI -ContentType "application/json" -Websession $Session.Websession -Headers $session.headers -Method GET
## the ".entries" property has the collection of types data
## there are about 422 objects returned in ".entries" property on this 600F (about half of which are Enum types)
($oWebResponse.content | ConvertFrom-Json).entries
# @base updated links
# ----- ------- -----