View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View WinPSDefaultSecurityProtocols.ps1
[System.Net.ServicePointManager]::SecurityProtocol
Ssl3, Tls
View WinPSAdditionalSecurityProtocol.ps1
[System.Net.ServicePointManager]::SecurityProtocol += [System.Net.SecurityProtocolType]::'Tls12'
[System.Net.ServicePointManager]::SecurityProtocol
Ssl3, Tls, Tls12
View PSCoreSslProtocolParameter.ps1
Invoke-RestMethod -Method POST -Body $Body -Uri $URI -SslProtocol Tls12
View PowervRASSLProtocol.ps1
$SecurePassword = ConvertTo-SecureString “P@ssword” -AsPlainText -Force
Connect-vRAServer -Server vraappliance01.domain.local -Tenant Tenant01 -Username TenantAdmin01 -Password $SecurePassword -IgnoreCertRequirements -SslProtocol Tls12
View PowervRASslProtocolDefaultCustom.ps1
Server : https://vraapliance08.vrademo.local
Token : MTUxMzI1MTgwMzEzMjpiZjI4MjQzZDY5ZTM5ZGU3ZjgwMzp0ZW5hbnQ6dGVuYW50MDF1c2VybmFtZTp0ZW5hbnRhZG1pbjAxQHZyYWRlbW8ubG9jYWxleHBpcmF0aW9uOjE1MTMyODA2MDMwMDA6ODczZjZhZTM2ZDY1YTY3OT
AzMjcyNmY5Yjc4NmIxZDI5N5YWFkM2Q0ZmE2MGI2NGY5Mzg0ZWJjMzViMDk0MDhlYzBkZTVmOTMxODI2YWE5ZmI5YTEyZTBiYWEyNzE0NGQyOTNmZDA1YWRlNmE3MzcyMDE3MTExMzk4NzIxMTA=
Tenant : Tenant01
Username : Tenantadmin01@vrademo.local
APIVersion : 7.3
SignedCertificates : False
SslProtocol : Default
View Set-ContentEncodingByte.ps1
Set-Content -Path 'C:\test' -Encoding Byte
View Set-ContentEncodingBytePSCore.ps1
Set-Content -Path '/root/test' -Encoding
ascii oem utf7 utf8BOM utf32
bigendianunicode unicode utf8 utf8NoBOM
View Set-ContentAsByteStream.ps1
Set-Content -Path '/root/test' -AsByteStream
View $env:PSMODULEPATH-RC.ps1
$env:PSMODULEPATH
/home/jmedd/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/6.0.0-rc/Modules