Skip to content

Instantly share code, notes, and snippets.

@dooblpls
dooblpls / Get-SystemCMD.ps1
Created January 19, 2026 09:24
Powershell Get System cmd without psexec
<#
.SYNOPSIS
Startet eine CMD als SYSTEM ohne PsExec.
Benötigt Administratorrechte.
#>
# 1. C# Definition für Win32 API Aufrufe
$Source = @"
using System;
using System.Runtime.InteropServices;
@dooblpls
dooblpls / Get-DeviceJoinAccessToken.ps1
Created November 21, 2025 11:54
Check if the Bulk Token in your Provisioning Package is still valid and working. AzureAD Entra ID Entra Join ppkg
#Requires -RunAsAdministrator
#This will extract the BPRT from your unencrypted ppkg file and requests a new access token
#It will fail to acquire a new access token if your BPRT is expired: AADSTS700082: The refresh token has expired due to inactivity.
#Path to your ppkg file
$ppkgpath = "C:\Users\admin\Documents\Windows Imaging and Configuration Designer (WICD)\Project_1\Project_1.ppkg"
# Parse-JWTtoken Source https://michev.info/blog/post/2140/decode-jwt-access-and-id-tokens-via-powershell
function Parse-JWTtoken {
[cmdletbinding()]
@dooblpls
dooblpls / delegation.ps1
Created November 22, 2024 09:09
Delegation suchen in AD Gruppen
# Name der zu suchenden Gruppe
$searchGroup = "DeineGruppe"
# Funktion zur Überprüfung der Delegierungsrechte
function Check-GPODelegation {
param (
[string]$GPOName,
[string]$Group
)
@dooblpls
dooblpls / copygplinks.ps1
Last active November 13, 2024 13:02
gplinks bisschen kopieren
@dooblpls
dooblpls / ExportIntunePowershellScripts.ps1
Created October 28, 2024 09:56
This PowerShell script backs up all Intune Device Management scripts from Microsoft Graph, which are not directly accessible through the UI. It connects to the Microsoft Graph API, retrieves the scripts, and saves them locally. Use this script to create regular backups of your Intune device configuration scripts. Keywords: Intune, PowerShell, Mi…
<#
Microsoft.Graph and Microsoft.Graph.Beta Modules are required
Install-Module Microsoft.Graph
Install-Module Microsoft.Graph.Beta
#>
Connect-MgGraph -Scopes "DeviceManagementConfiguration.Read.All"