Skip to content

Instantly share code, notes, and snippets.

Avatar

Joerg Hochwald jhochwald

View GitHub Profile
@jhochwald
jhochwald / Invoke-MitigatePrinterHell.ps1
Created Jul 2, 2021
Mitigate CVE-2021-1675 related issues By disabling the printer spooler on all servers in a AD Domain
View Invoke-MitigatePrinterHell.ps1
<#
.SYNOPSIS
Mitigate CVE-2021-1675 related issues
.DESCRIPTION
Disable the printer spool on all servers within a Domain.
You need admin permission and PowerShell needs to be configured and
enabled for the user that executes the script.
.EXAMPLE
@jhochwald
jhochwald / Invoke-EnableLoggingToFindPrinterHell.ps1
Created Jul 2, 2021
Configure the logging to find CVE-2021-1675 related incidents
View Invoke-EnableLoggingToFindPrinterHell.ps1
<#
.SYNOPSIS
Configure the logging to find CVE-2021-1675 related incidents
.DESCRIPTION
Configure the logging to find CVE-2021-1675 related incidents
.EXAMPLE
PS C:\> .\Invoke-EnableLoggingToFindPrinterHell
@jhochwald
jhochwald / Get-MobileDeviceReporting.ps1
Created Apr 7, 2021
Get a basic report of Mobile Devices connected to the Microsoft 365 Tenant
View Get-MobileDeviceReporting.ps1
#requires -Version 3.0 -Modules ExchangeOnlineManagement
<#
.SYNOPSIS
Get a basic report of Mobile Devices
.DESCRIPTION
Get a basic report of Mobile Devices connected to the Microsoft 365 Tenant
.EXAMPLE
PS C:\> .\Get-MobileDeviceReporting.ps1
@jhochwald
jhochwald / Get-OneDriveUsageReport.ps1
Created Apr 7, 2021
Generates a basic usage report for OneDrive for Business sites
View Get-OneDriveUsageReport.ps1
#requires -Version 3.0 -Modules Microsoft.Online.SharePoint.PowerShell
<#
.SYNOPSIS
Generates a basic usage report for OneDrive for Business sites
.DESCRIPTION
Generates a basic usage report for OneDrive for Business sites
The report will contain the following information:
- Owner (UPN)
@jhochwald
jhochwald / ADMX–OneDrive.admx-KFM.json
Last active Apr 6, 2021
Import an Enpoing Manager (Intune) Device configuration from an existing JSON File
View ADMX–OneDrive.admx-KFM.json
{
"@odata.type": "#microsoft.graph.windows10CustomConfiguration",
"id": "f2d6ce45-3bc7-4584-b391-120aa53eabea",
"lastModifiedDateTime": "2018-09-09T13:47:31.4040135Z",
"createdDateTime": "2018-07-07T14:21:22.3292533Z",
"description": "",
"displayName": "ADMX - OneDrive - KFM.admx",
"version": 7,
"omaSettings": [
{
@jhochwald
jhochwald / invoke-ExchangeSafetyRules.ps1
Created Apr 5, 2021
Deploying Exchange Online security and spoofing warnings rules
View invoke-ExchangeSafetyRules.ps1
#requires -Version 3.0 -Modules ExchangeOnlineManagement, MSOnline
<#
.SYNOPSIS
Deploying Exchange Online security and spoofing warnings rules
.DESCRIPTION
Deploying Exchange Online security and spoofing warnings rules
.EXAMPLE
@jhochwald
jhochwald / Get-FritzBoxEvents.ps1
Created Mar 25, 2021
Get the Events from a FritzBox router
View Get-FritzBoxEvents.ps1
function Get-FritzBoxEvents
{
<#
.SYNOPSIS
Get the Events from a FritzBox router
.DESCRIPTION
Get the Events from a FritzBox router
.PARAMETER FritzBoxUser
@jhochwald
jhochwald / Get-HafniumReports.ps1
Created Mar 21, 2021
Helper script to investigate a Hafnium attack
View Get-HafniumReports.ps1
<#
.SYNOPSIS
Helper script to investigate a Hafnium attack
.DESCRIPTION
Helper script to investigate a Hafnium attack
.PARAMETER ReportPath
Where to save the reports
@jhochwald
jhochwald / Invoke-GetAzureADAuditSignInLogs.ps1
Created Mar 21, 2021
Get the AzureAD Audit Sign-In Logs and create several CSV files
View Invoke-GetAzureADAuditSignInLogs.ps1
<#
.SYNOPSIS
Get the AzureAD Audit Sign-In Logs
.DESCRIPTION
Get the AzureAD Audit Sign-In Logs and create several CSV files
.PARAMETER Days
Days to search
@jhochwald
jhochwald / Get-MicrosoftWhiteboardReport.ps1
Created Mar 14, 2021
Get all Whiteboards for a given UserID or UserPrincipalName
View Get-MicrosoftWhiteboardReport.ps1
#requires -Version 3.0 -Modules AzureAD, WhiteboardAdmin
function Get-MicrosoftWhiteboardReport
{
<#
.SYNOPSIS
Get all Whiteboards for a given user
.DESCRIPTION
Get all Whiteboards for a given UserID or UserPrincipalName