Skip to content

Instantly share code, notes, and snippets.

Avatar

Joerg Hochwald jhochwald

View GitHub Profile
View Microsoft.PowerShell_profile.ps1
# %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
}
@janegilring
janegilring / Set-NetFirewallExchangeOnlineRule.ps1
Created Aug 26, 2018
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
View Set-NetFirewallExchangeOnlineRule.ps1
# 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
@LawrenceHwang
LawrenceHwang / list.md
Created Jan 16, 2018
PowerShell Core 6 and PowerShell 5.1 Cmdlet comparison
View list.md

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|

@zenorocha
zenorocha / README.md
Last active Jun 17, 2021
A template for Github READMEs (Markdown) + Sublime Snippet
View README.md

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage