Skip to content

Instantly share code, notes, and snippets.

View jhochwald's full-sized avatar
🤙

Joerg Hochwald jhochwald

🤙
View GitHub Profile
@jhochwald
jhochwald / Get-ADFSCertificate-Token-Signing.ps1
Created April 26, 2017 16:49
ADFS Authentication with Exchange troubleshooting
Get-ADFSCertificate Token-Signing | Select-Object Thumbprint
@jhochwald
jhochwald / Approve-WSUSLicenseAgreementAcceptance.ps1
Created December 15, 2018 20:32
Accept License Agreements for all Windows Server Update Services (WSUS) Updates
#requires -Version 3.0 -Modules UpdateServices
<#
.SYNOPSIS
Accept License Agreements
.DESCRIPTION
Accept License Agreements for all Windows Server Update Services (WSUS) Updates
.PARAMETER Name
@jhochwald
jhochwald / Export-DistributionGroup2Cloud.ps1
Created November 24, 2018 08:55
Function to convert/migrate on-premises Exchange distribution group to a Cloud (Exchange Online) distribution group
function Export-DistributionGroup2Cloud
{
<#
.SYNOPSIS
Function to convert/migrate on-premises Exchange distribution group to a Cloud (Exchange Online) distribution group
.DESCRIPTION
Copies attributes of a synchronized group to a placeholder group and CSV file.
After initial export of group attributes, the on-premises group can have the attribute "AdminDescription" set to "Group_NoSync" which will stop it from be synchronized.
The "-Finalize" switch can then be used to write the addresses to the new group and convert the name. The final group will be a cloud group with the same attributes as the previous but with the additional ability of being able to be "self-managed".
@jhochwald
jhochwald / FileSpeedTest.ps1
Created January 26, 2023 19:31
File I/O Speed-Testing - compare native .NET vs. native Powershell (Just an example)
#requires -Version 3.0
<#
.SYNOPSIS
File I/O Speed-Testing
.DESCRIPTION
File I/O Speed-Testing
.PARAMETER ReadFile
@jhochwald
jhochwald / Invoke-LogOffAllUsersOnServer.ps1
Created January 6, 2020 23:18
Log off all users on a Windows Server or Remote Desktop Server
<#
.SYNOPSIS
Log off all users on a Windows Server or Remote Desktop Server
.DESCRIPTION
Log off all users on a Windows Server or Remote Desktop Server
.PARAMETER ComputerName
Specifies the computers on which the command runs. The default is the local computer.
@jhochwald
jhochwald / Firefox-54.0.1.plist
Created July 16, 2017 16:36
Mozilla FireFox deployment customisation for Munki based Deployments PLIST example
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>_metadata</key>
<dict>
<key>created_by</key>
<string>macadmin</string>
<key>creation_date</key>
<date>2017-06-30T22:05:31Z</date>
@jhochwald
jhochwald / JSON_Config.ps1
Last active November 7, 2023 19:36
How to use a JSON based config file with PowerShell Modules or Scripts
<#
{
"info": {
"Statement": "Code is poetry",
"Author": "Joerg Hochwald",
"Contact": "joerg.hochwald@outlook.com",
"Link": "http://hochwald.net",
"Support": "https://github.com/jhochwald/MyPowerShellStuff/issues"
},
"Copyright": "(c) 2012-2015 by Joerg Hochwald. All rights reserved."
@jhochwald
jhochwald / install-DotNET-Linux-ARM64.sh
Last active October 17, 2023 14:44
Install the PowerShell 7.3.8 binary release on a Debian ARM64 Linux box, or Debian ARM64 based WSL. There is no DEB package, yet!
# install the dependencies
apt install libc6 libgcc1 libgssapi-krb5-2 libicu72 libssl1.1 libstdc++6 zlib1g -y
# Get the .NET install script
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
# Make it executable
chmod +x ./dotnet-install.sh
# Install the .NET SDK 7.0 (STS) for ARM64
@jhochwald
jhochwald / Convert_O365_SKUs_and_Services.ps1
Last active September 18, 2023 16:33
Coverts Office 365 SKUs and Services to a human understandable Format.
#requires -Version 2.0 -Modules MSOnline
<#
PowerShell Core (PWSH) is not supported, at least not yet
# Easy way to install the MSOL Module, requires PowerShell 5 or PSGet
Install-Module -Name MSOnline
I still use the old (MSOL) module, cause it works best at the moment.
I might convert more and more to the newer modules
@jhochwald
jhochwald / unifi_controller_update.sh
Created August 10, 2019 09:26
Download a new UniFi Controller Firmware and install it
#!/usr/bin/env bash
# Download a new UniFi Controller Firmware and install it
# Used to to automate the installation of newer controller firmware on a UniFi Cloud Key
# Author: Joerg Hochwald
# Copyright: Copyright (c) 2019, Joerg Hochwald - All rights reserved.
# LICENSE: License: https://opensource.org/licenses/BSD-3-Clause
# THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.