Skip to content

Instantly share code, notes, and snippets.

View jhochwald's full-sized avatar
🤙

Joerg Hochwald jhochwald

🤙
View GitHub Profile
@zenorocha
zenorocha / README.md
Last active August 22, 2024 14:20
A template for Github READMEs (Markdown) + Sublime Snippet

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

@LawrenceHwang
LawrenceHwang / list.md
Created January 16, 2018 19:46
PowerShell Core 6 and PowerShell 5.1 Cmdlet comparison

Only in PS Core 6

Cmdlet Module
Remove-Service Microsoft.PowerShell.Management
Get-Uptime Microsoft.PowerShell.Utility
Remove-Alias Microsoft.PowerShell.Utility

Only in PS 5.1 Desktop (i.e missing from PS Core 6)

|Cmdlet|Module|

@janegilring
janegilring / Set-NetFirewallExchangeOnlineRule.ps1
Created August 26, 2018 19:17
Shows how to leverage the Get-Office365Endpoint script by Joerg Hochwald to configure Windows Firewall on a Microsoft Exchange Server to restrict SMTP traffic only from IP ranges used by Exchange Online Protection
# Define the Get-Office365Endpoint function in the current PowerShell session
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/janegilring/PSCommunity/master/Office%20365/Get-Office365Endpoint.ps1'))
# Retrieve endpoints for Exchange Online and filter on TCP port 25
$ExchangeOnlineEndpoints = Get-Office365Endpoint -Services Exchange
$ExchangeOnlineSMTPEndpoints = $ExchangeOnlineEndpoints | Where-Object {
$PSItem.ip -and
$PSItem.DisplayName -eq 'Exchange Online' -and
@JustinGrote
JustinGrote / ModuleFast.ps1
Last active August 17, 2024 11:42
Bootstrap Script for a High Performance Module Installer
using namespace System.Net.Http
#requires -version 7.2
# This is the bootstrap script for Modules
[CmdletBinding(PositionalBinding = $false)]
param (
#Specify a specific release to use, otherwise 'latest' is used
[string]$Release = 'latest',
#Specify the user
[string]$User = 'JustinGrote',
#Specify the repo
# %UserProfile%\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
Add-Type -AssemblyName WindowsBase
Add-Type -AssemblyName PresentationCore
if (-not [Windows.Input.Keyboard]::IsKeyDown([System.Windows.Input.Key]::LeftCtrl))
{
Import-Module posh-git
Import-Module Pscx
}
@IISResetMe
IISResetMe / Find-VulnerableSchemas.ps1
Last active April 10, 2024 06:30
Find-VulnerableSchemas.ps1
# Dictionary to hold superclass names
$superClass = @{}
# List to hold class names that inherit from container and are allowed to live under computer object
$vulnerableSchemas = [System.Collections.Generic.List[string]]::new()
# Resolve schema naming context
$schemaNC = (Get-ADRootDSE).schemaNamingContext
# Enumerate all class schemas