This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Retrieve-IntelCPUCoreAffinityInfo.ps1, 20240524 VdP | |
# This script queries Intel ARK website for processor information, | |
# then uses retrieved Performance & Efficiency Core counts to calculate some common affinity masks and decimal values: | |
# Only Perf Cores | |
# Only Perf Cores (without hyperthreading) | |
# Only Efficiency Cores | |
# These values can then be used to limit a process to use only particular CPU cores (set CPU affinity) | |
If (-not (Get-Module -ErrorAction Ignore -ListAvailable PowerHTML)) { Install-Module PowerHTML -Force } | |
$ProcessorSearchString = (Get-CimInstance -ClassName Win32_Processor | Select -ExpandProperty Name) -Replace ' CPU @.*' -Replace '.* ' #'.* (i[0-9]\-)?' | |
#$ProcessorSearchString = '12th Gen Intel(R) Core(TM) i7-1255U' -Replace '.* ' #'.* (i[0-9]\-)?' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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')] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |