Skip to content

Instantly share code, notes, and snippets.

View jhochwald's full-sized avatar
🤙

Joerg Hochwald jhochwald

🤙
View GitHub Profile
#region Info
<#
#################################################
# modified by : Joerg Hochwald
# last modified : 2016-05-28
#################################################
Support: https://github.com/jhochwald/NETX/issues
#>
@jhochwald
jhochwald / PsGetTools.ps1
Last active June 11, 2016 12:48
A few tools for the PsGet package management
#requires -Version 2
#region Info
<#
#################################################
# modified by : Joerg Hochwald
# last modified : 2016-06-10
#################################################
Support: https://github.com/jhochwald/NETX/issues
# Simple find function
function find ($filter, $path) {
if ($path -eq $null) {
Get-Childitem -recurse -filter $filter
} else {
Get-Childitem -recurse -filter $filter -path $path
}
}
@jhochwald
jhochwald / .htaccess
Created July 26, 2016 20:28
Wordpress enforced SSL with NGINX and/or CloudFlare as reverse Proxy
<IfModule mod_rewrite.c>
RewriteEngine On
# This is needed for NGINX and CloudFlare Reverse Proxy Servers
RewriteCond %{HTTP:X-Forwarded-Proto} =http [OR]
# This is just in case
RewriteCond %{HTTP:X-Forwarded-Proto} =""
RewriteCond %{HTTPS} !=on
# Here comes the redirect to SSL
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteBase /
@jhochwald
jhochwald / win10vm.ps1
Last active November 12, 2016 17:48
PowerShell Script to create a simple Windows 10 VM in my Hyper-V LAB
<#
.SYNOPSIS
Create a simple Windows 10 VM
.DESCRIPTION
Create a simple Windows 10 VM for my Test-LAB
.PARAMETER Client
Client Name
@jhochwald
jhochwald / IIS_SSLConfig.ps1
Created November 26, 2016 14:38
Enales a stronger and more secure SSL configuration in IIS
#requires -Version 1.0
function Set-EnableStrongSSLConfig
{
<#
.SYNOPSIS
Make IIS SSL Config more secure
.DESCRIPTION
Enales a stronger SSL configuration in IIS
@jhochwald
jhochwald / office2016_postinstall.sh
Created November 29, 2016 22:15
This little helper suppresses the "What’s New" dialog for Office 2016 apps, and it also prevents the transfer of the telemetry data to Microsoft.
#!/usr/bin/env bash
###
#
# office2016_postinstall.sh
#
# This little helper suppresses the "What’s New" dialog for Office 2016 apps,
# and it also prevents the transfer of the telemetry data to Microsoft.
# Outlook 2016 and OneNote need an addition setting;
# The script takes care about that!
@jhochwald
jhochwald / fix_adfs_for_Windows10_and_edge.ps1
Last active December 9, 2016 14:11
Make ADFS Work with Windows 10 and Edge
<#
Tweaked Version that prevents the Auth Pop-Up on non Windows devices a bit better
These Devices should get the regular Forms based (HTML Page) instead.
I was asked: Nope, 'Mozilla/5.0 (Windows NT' is correct, not an error ;-)
#>
# Execute this on your ADFS Server
# If you have more then one, use your primary ADFS server, this is essential!
Set-ADFSProperties -ExtendedProtectionTokenCheck None
@jhochwald
jhochwald / Prepare_ADFS_For_Exchange_On_Premises_Auth.ps1
Last active April 14, 2021 08:06
Enable ADFS Authentication on Exchange 2016 on Premises. Will work on Exchange 2013 to
# Execute this on or against your Exchange Server:
# (Get-OwaVirtualDirectory).ExternalUrl.AbsoluteUri
[string]$ExchangeOWAURL = 'FILL_IN_THE_INFO'
# Execute this on or against your Exchange Server:
# (Get-EcpVirtualDirectory).ExternalUrl.AbsoluteUri
[string]$ExchangeECPURL = 'FILL_IN_THE_INFO'
<#
Disclaimer:
@jhochwald
jhochwald / Create_new_Storage_Space.ps1
Created December 28, 2016 13:33
Creates a new Storage Space with a SSD and a HDD Tier for my Hyper-V Server
#requires -Version 3.0 -Modules Storage
# Get all Physical Disks
<#
.SYNOPSIS
Create a new Storage Space for my Hyper-V Server
.DESCRIPTION
Creates a new Storage Space with a SSD and a HDD Tier for my Hyper-V Server