View appsettings.json
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
{ | |
"defaultProxy": { | |
"proxy": { | |
"-usesystemdefault": "True", | |
"-proxyaddress": "http://localhost:8500", | |
"-bypassonlocal": "False" | |
} | |
} | |
} |
View create file with leading space.ps1
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
Write-Output "test" > " another test in space.txt" | |
Get-Item "*.txt" |
View logback.xml
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
<appender name="rollingSI4TExtensionsLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
<fileNamePattern>${log.folder}/si4t-extentions.%d{yyyy-MM-dd}.log</fileNamePattern> | |
<maxHistory>${log.history}</maxHistory> | |
</rollingPolicy> | |
<encoder> | |
<charset>${log.encoding}</charset> | |
<pattern>${log.pattern}</pattern> | |
</encoder> | |
<prudent>true</prudent> |
View tls.ps1
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
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 |
View disable TLS 1.0 and TLS 1.1 in JAVA
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
From https://stackoverflow.com/a/32510141/1678525 | |
jdk.tls.disabledAlgorithms= SSLv2Hello, SSLv3, TLSv1, TLSv1.1 | |
In the file jre/lib/security/java.security on the server | |
Mind that the jdk.tls.disabledAlgorithms might already have many more protocols, add the protocols above to that list. |
View enable-TLS.ps1
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
# Inspired by https://gist.github.com/jbratu/6262684939e15e638892973f5f8eed78 and https://stackoverflow.com/questions/55914397/enable-tls-and-disable-ssl-via-powershell-script | |
function Disable-SSL-2.0 { | |
New-Item 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server' -Force | Out-Null | |
New-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server' -name Enabled -value 0 -PropertyType 'DWord' -Force | Out-Null | |
New-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server' -name 'DisabledByDefault' -value 1 -PropertyType 'DWord' -Force | Out-Null | |
New-Item 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client' -Force | Out-Null | |
New-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client' -name Enabled -value 0 -PropertyType 'DWord' -Force | Out-Null | |
New-Ite |
View Test-ServerSSLSupport.ps1
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 Test-ServerSSLSupport { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory = $true, ValueFromPipeline = $true)] | |
[ValidateNotNullOrEmpty()] | |
[string]$HostName, | |
[UInt16]$Port = 443 | |
) | |
process { | |
$RetValue = New-Object psobject -Property @{ |
View list-system-users.ps1
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
# see https://github.com/pkjaer/tridion-powershell-modules | |
# see https://gist.github.com/jhorsman/b218ba7e2e5587d21c395d5968583b61 to learn more about configuring the Tridion-CoreService module | |
# Install the Tridion-CoreService module from the Tridion-Powershell-Modules project | |
Install-Module -Name Tridion-CoreService | |
Import-Module -Name Tridion-CoreService | |
# Set the server configuration | |
Set-TridionCoreServiceSettings -Credential (Get-Credential) -CredentialType Windows | |
Set-TridionCoreServiceSettings -HostName my-cms-server -Version Web-8.5 -ConnectionType Basic-SSL |
View Install Tridion-CoreService module.ps1
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
# Install the Tridion-CoreService module from the Tridion-Powershell-Modules project. See https://github.com/pkjaer/tridion-powershell-modules | |
Install-Module -Name Tridion-CoreService | |
Import-Module -Name Tridion-CoreService | |
# Set the server configuration | |
Set-TridionCoreServiceSettings -HostName my-cms-server -Version Web-8.5 -ConnectionType Basic | |
Set-TridionCoreServiceSettings -Credential (Get-Credential) -CredentialType Windows | |
# Alternatively use SSL (https) | |
#Set-TridionCoreServiceSettings -HostName my-cms-server -Version Web-8.5 -ConnectionType Basic-SSL |
View Windows Desktop and Explorer settings.ps1
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
# from https://superuser.com/a/1479800/477803 | |
function Test-DesktopIconHidden { | |
[CmdletBinding(SupportsShouldProcess=$false)] | |
Param() | |
Process { | |
$Shell = New-Object -ComObject "Shell.Application" | |
$Shell.GetSetting(0x4000) | |
} |
NewerOlder