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 -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) { |
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
## 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 | |
# ----- ------- ----- |