Skip to content

Instantly share code, notes, and snippets.

View jhochwald's full-sized avatar
🤙

Joerg Hochwald jhochwald

🤙
View GitHub Profile
@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 / 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
@jhochwald
jhochwald / Exchange-Migration_proxy_fix.ps1
Created January 16, 2017 07:35
Fix Exchange Migration Endpoint Proxy
<#
.SYNOPSIS
Fix Exchange Migration Endpoint Proxy
.DESCRIPTION
Disable and enable MRSProxyEnabled on the Exchange WebServicesVirtualDirectory
.NOTES
I had an issue while enable a hybrid deployment.
The Wizard enabled it (as he should), but then failed during the test.
@jhochwald
jhochwald / ADFS_Snippets.ps1
Created January 16, 2017 10:43
Some ADFS snippets
# Turn off Certificate Rollover
Set-AdfsProperties -AutoCertificateRollover $false
# Allow Login via Mail (And UPN)
Set-AdfsClaimsProviderTrust -TargetIdentifier "AD AUTHORITY" -AlternateLoginID mail -LookupForests $ADDom
<#
Enable SNI (Might be needed)
@jhochwald
jhochwald / Protect_all_OUs_in_AD-Domain.ps1
Created January 30, 2017 19:28
Protect all existing OUs in your domain from accidental deletion
# Protect all existing OUs in your domain from accidental deletion
# As required from the Active Directory Best Practices Analyzer (BPA)
Get-ADOrganizationalUnit -filter * -Properties ProtectedFromAccidentalDeletion | Where-Object -FilterScript {
$_.ProtectedFromAccidentalDeletion -eq $false
} | Set-ADOrganizationalUnit -ProtectedFromAccidentalDeletion $true
@jhochwald
jhochwald / Tweak_AD_DNS_Zones.ps1
Created January 30, 2017 19:30
Tweak all AD DNS Zones
<#
Modify all Primary DNS Zones
#>
# Defaults (Check this)
$NoRefreshInterval = New-TimeSpan -Days '7'
$RefreshInterval = New-TimeSpan -Days '7'
$ScavengingInterval = New-TimeSpan -Days '4'
# Select the DNS Zones to modify
@jhochwald
jhochwald / Remove_all_DNS_RootHints.ps1
Created January 30, 2017 19:33
Remove all Root Hints from AD DNS Server
Get-DnsServerRootHint | Remove-DnsServerRootHint -Force
# Might be a good idea if you use forwarders (e.g. Google DNS, OpenDNS, or others)
# I remove them because I use a a Linux based DNS Servers as forwarder. They run a caching Name Server based on unbound.
@jhochwald
jhochwald / invoke-DisableNetbiosOnServers.ps1
Created February 8, 2017 20:40
Disables the NetBIOS of all NICs on all servers within the AD
function invoke-DisableNetbiosOnServers
{
<#
.SYNOPSIS
Disables the NetBIOS of all NICs on all servers within the AD
.DESCRIPTION
Disables the NetBIOS of all NICs on all servers within the AD and Unchecks the DNS registration of all non AD pointing NICs (based on the IP Address)
.EXAMPLE