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-PlaintextFromSecureString([SecureString]$SecureString) { | |
return (New-Object -TypeName System.Net.NetworkCredential('fake-user', $SecureString, 'fake-domain')).Password | |
} | |
function EncryptStringToBytes([String]$Plaintext, [System.Security.SecureString]$Password) { | |
# C# code from: | |
# https://gist.github.com/mark-adams/87aa34da3a5ed48ed0c7 | |
# https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.aes?view=netframework-4.8 | |
$Aes = $null |
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
@ECHO OFF | |
SET BCX_ROOT=C:\Program Files (x86)\BCX | |
SET PATH=%PATH%;C:\Program Files (x86)\BCX\Bin;C:\Program Files\PellesC\Bin | |
ECHO BCXCON - Compile console applications | |
ECHO BCXDLL - Compile dynamic libraries | |
ECHO BCXGUI - Compile GUI applications |
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
<# | |
System.IdentityModel.Tokens.Jwt with PowerShell to create JWT using RS256. | |
http://blog.d-apps.com/2013/08/powershell-and-json-web-token-handler.html | |
Tested using: | |
Windows 10.0.18362.628 | |
PowerShell 7.0.0 | |
Windows PowerShell 5.1.18362.628 | |
NuGet 5.4.0.6315 | |
System.IdentityModel.Tokens.Jwt 5.6.0 |
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
<# | |
PowerShell library for performing geo IP lookups. | |
Requirements: | |
- PowerShell 7.0.0 or Windows PowerShell 5.1.18362.628 | |
https://github.com/PowerShell/PowerShell/releases | |
- nuget 5.4.0.6315 | |
Invoke-WebRequest -Uri 'https://dist.nuget.org/win-x86-commandline/latest/nuget.exe' -OutFile (Join-Path -Path ([Environment]::GetFolderPath('UserProfile')) -ChildPath 'Downloads\nuget.exe') |
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
<# | |
Windows PowerShell library for performing basic requests on Google Apps User resources. | |
These are general steps and may not follow the Google Dashboard step-by-step. | |
Requirements: | |
- .NET Framework 4.5 | |
https://www.microsoft.com/net/download/dotnet-framework-runtime | |
- .NET Core SDK 2.1.101 |
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
# | |
# Moved code to shibidp-deploy.psm1. | |
# | |
# Must call function now, but this allows customization using parameters. | |
# | |
# Perform default install. | |
# iex (iwr 'https://gist.githubusercontent.com/dindoliboon/553884cfc67cc2672a786e4aee69cd63/raw/shibidp-deploy.ps1').Content | |
# | |
# Example on customizing non-HTTPS port and Java heap size. | |
# iex (iwr 'https://gist.githubusercontent.com/dindoliboon/553884cfc67cc2672a786e4aee69cd63/raw/shibidp-deploy.psm1').Content; Install-App -JettyNonHttpsPort 8081 -JavaMinimumHeapSize '4g' -JavaMaximumHeapSize '4g' |
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 Set-PropertyValue | |
{ | |
[CmdletBinding()] | |
param($Path, $Key, $Value, $Separator='=', $Comment="# ", $Backup=$true) | |
$ini = Get-Content -Path $Path | |
$newIniPath = [System.IO.Path]::GetTempFileName() | |
$found = $false | |
$ini.Split("`n") |% { |
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
<# | |
.DESCRIPTION | |
Downloads a file from the specified website. | |
.EXAMPLE | |
Downloads Jetty 9.3.20. | |
Get-WebFile -Uri 'http://central.maven.org/maven2/org/eclipse/jetty/jetty-distribution/9.3.20.v20170531/jetty-distribution-9.3.20.v20170531.zip' -OutFile 'C:\jetty-distribution-9.3.20.v20170531.zip' | |
.EXAMPLE | |
Downloads Oracle Server JRE 8u131 and verifies hash. | |
Get-WebFile -Uri 'http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/server-jre-8u131-windows-x64.tar.gz' -OutFile 'C:\server-jre-8u131-windows-x64.tar.gz' -Cookie 'oraclelicense=accept-securebackup-cookie;' -Hash '1806EBE235EAB2B21C893ACBF0B287A392CE6B5EDFEA3286FC8FF7D6DEFB19CB' | |
.OUTPUTS |
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
<# | |
Generates JNLP file from an Oracle Forms application. | |
Tested against an Oracle Forms 11g server. | |
Information from: | |
Jan Carlin's Blog - Forms and Java Web Start | |
https://web.archive.org/web/20081201161421/http://groundside.com/blog/JanCarlin.php | |
#> |
NewerOlder