Skip to content

Instantly share code, notes, and snippets.

View vdepagter's full-sized avatar
🎯
Focusing

Valentijn vdepagter

🎯
Focusing
  • Netherlands
  • 11:03 (UTC +02:00)
View GitHub Profile
@vdepagter
vdepagter / Get-MgGraphAllPages.ps1
Created December 29, 2023 11:34
Get-MgGraphAllPages.ps1
# Source: David Richmond, https://dev.to/celadin/get-mggraphallpages-the-mggraph-missing-command-45b5
function Get-MgGraphAllPages {
[CmdletBinding(
ConfirmImpact = 'Medium',
DefaultParameterSetName = 'SearchResult'
)]
param (
[Parameter(Mandatory = $true, ParameterSetName = 'NextLink', ValueFromPipelineByPropertyName = $true)]
[ValidateNotNullOrEmpty()]
[Alias('@odata.nextLink')]
@vdepagter
vdepagter / Configure-ChromeFlags.ps1
Last active March 10, 2023 14:52
Configure chrome://flags (enabled_labs_experiments) through users' Local State file
# Source: https://gist.github.com/vdepagter/c3a66526467c381bc0b416ca879183c8
# Requires all Chrome processes to be stopped (check persistent task bar).
# Modify $SetProperties as desired. These flags will be added or modified. Existing flags are preserved.
If (Test-Path "I:\Chrome") {
Start-Transcript "I:\Chrome\Set-ChromePrefs.log"
[array]$SetProperties = 'enable-native-notifications@2','enable-system-notifications@2'
try {
If (Test-Path "HKCU:\Software\Policies\Google\Chrome") { $LocalStateFile = (Get-ItemProperty "HKCU:\Software\Policies\Google\Chrome").UserDataDir + '\Local State' }
If (-not $LocalStateFile) { $LocalStateFile = "$($env:localappdata)\Google\Chrome\User Data\Local State" }
#notepad $LocalStateFile