Skip to content

Instantly share code, notes, and snippets.

View jonathanmedd's full-sized avatar

Jonathan Medd jonathanmedd

View GitHub Profile
@jonathanmedd
jonathanmedd / 0_reuse_code.js
Created February 3, 2016 10:27
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jonathanmedd
jonathanmedd / WinPSDefaultSecurityProtocols.ps1
Created December 14, 2017 11:26
Windows PS - Default Security Protocols
[System.Net.ServicePointManager]::SecurityProtocol
Ssl3, Tls
@jonathanmedd
jonathanmedd / WinPSAdditionalSecurityProtocol.ps1
Created December 14, 2017 11:30
Windows PS - Additional Security Protocol
[System.Net.ServicePointManager]::SecurityProtocol += [System.Net.SecurityProtocolType]::'Tls12'
[System.Net.ServicePointManager]::SecurityProtocol
Ssl3, Tls, Tls12
@jonathanmedd
jonathanmedd / PSCoreSslProtocolParameter.ps1
Created December 14, 2017 11:36
PS Core - SslProtocol Parameter
Invoke-RestMethod -Method POST -Body $Body -Uri $URI -SslProtocol Tls12
@jonathanmedd
jonathanmedd / PowervRASSLProtocol.ps1
Created December 14, 2017 11:39
PowervRA - SSLProtocol
$SecurePassword = ConvertTo-SecureString “P@ssword” -AsPlainText -Force
Connect-vRAServer -Server vraappliance01.domain.local -Tenant Tenant01 -Username TenantAdmin01 -Password $SecurePassword -IgnoreCertRequirements -SslProtocol Tls12
@jonathanmedd
jonathanmedd / PowervRASslProtocolDefaultCustom.ps1
Created December 14, 2017 11:47
PowervRA - SslProtocol Default Custom
Server : https://vraapliance08.vrademo.local
Token : MTUxMzI1MTgwMzEzMjpiZjI4MjQzZDY5ZTM5ZGU3ZjgwMzp0ZW5hbnQ6dGVuYW50MDF1c2VybmFtZTp0ZW5hbnRhZG1pbjAxQHZyYWRlbW8ubG9jYWxleHBpcmF0aW9uOjE1MTMyODA2MDMwMDA6ODczZjZhZTM2ZDY1YTY3OT
AzMjcyNmY5Yjc4NmIxZDI5N5YWFkM2Q0ZmE2MGI2NGY5Mzg0ZWJjMzViMDk0MDhlYzBkZTVmOTMxODI2YWE5ZmI5YTEyZTBiYWEyNzE0NGQyOTNmZDA1YWRlNmE3MzcyMDE3MTExMzk4NzIxMTA=
Tenant : Tenant01
Username : Tenantadmin01@vrademo.local
APIVersion : 7.3
SignedCertificates : False
SslProtocol : Default
@jonathanmedd
jonathanmedd / Set-ContentEncodingByte.ps1
Created December 22, 2017 12:32
Set-Content Encoding Byte
Set-Content -Path 'C:\test' -Encoding Byte
@jonathanmedd
jonathanmedd / Set-ContentEncodingBytePSCore.ps1
Created December 22, 2017 12:35
Set-Content Encoding Byte PS Core
Set-Content -Path '/root/test' -Encoding
ascii oem utf7 utf8BOM utf32
bigendianunicode unicode utf8 utf8NoBOM
@jonathanmedd
jonathanmedd / Set-ContentAsByteStream.ps1
Created December 22, 2017 12:37
Set-Content AsByteStream PS Core
Set-Content -Path '/root/test' -AsByteStream
$env:PSMODULEPATH
/home/jmedd/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/6.0.0-rc/Modules