Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jhochwald's full-sized avatar
🤙

Joerg Hochwald jhochwald

🤙
View GitHub Profile
@jhochwald
jhochwald / Invoke-MitigatePrinterHell.ps1
Created July 2, 2021 00:27
Mitigate CVE-2021-1675 related issues By disabling the printer spooler on all servers in a AD Domain
<#
.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 July 2, 2021 00:25
Configure the logging to find CVE-2021-1675 related incidents
<#
.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 April 7, 2021 20:57
Get a basic report of Mobile Devices connected to the Microsoft 365 Tenant
#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 April 7, 2021 19:13
Generates a basic usage report for OneDrive for Business sites
#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 April 6, 2021 00:31
Import an Enpoing Manager (Intune) Device configuration from an existing JSON File
{
"@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 April 5, 2021 19:49
Deploying Exchange Online security and spoofing warnings rules
#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 March 25, 2021 05:02
Get the Events from a FritzBox router
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 March 21, 2021 12:59
Helper script to investigate a Hafnium attack
<#
.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 March 21, 2021 12:37
Get the AzureAD Audit Sign-In Logs and create several CSV files
<#
.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 March 14, 2021 12:32
Get all Whiteboards for a given UserID or UserPrincipalName
#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