Modify Date: 13. December 2024
OS: Windows 11 24H2 (12B of 24)
Management Tool: Intune
Author: Marius Wyss
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
| <# | |
| .SYNOPSIS | |
| Decodes a Windows Autopilot "4K hardware hash" (DeviceHardwareData) into a structured PSCustomObject. | |
| .DESCRIPTION | |
| Port of 4khwhashdecipher.hexpat (ImHex pattern) to PowerShell. | |
| Reads the TLV (type-length-value) binary structure produced by OA3Tool and understood by | |
| MDM_DevDetail_Ext01.DeviceHardwareData, and decodes each known type into friendly fields. | |
| Data source priority: |
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
| Get-DeliveryOptimizationStatus | | |
| Select PredefinedCallerApplication, | |
| @{Name="SourceURL";Expression={$_."SourceURL" -replace '^.*/',''}}, | |
| DownloadMode, | |
| @{Name="FileSizeMB";Expression={[math]::round($_.FileSize / 1MB, 2)}}, | |
| @{Name="FileSizeInCacheMB";Expression={[math]::round($_.FileSizeInCache / 1MB, 2)}}, | |
| @{Name="TotalBytesDownloadedMB";Expression={[math]::round($_.TotalBytesDownloaded / 1MB, 2)}}, | |
| @{Name="BytesFromPeersMB";Expression={[math]::round($_.BytesFromPeers / 1MB, 2)}}, | |
| @{Name="BytesFromHttpMB";Expression={[math]::round($_.BytesFromHttp / 1MB, 2)}}, | |
| HttpConnectionCount, |
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
| <# | |
| .SYNOPSIS | |
| Lists not assigned apps Intune Win32Apps for the user to delete. | |
| .DESCRIPTION | |
| Lists all apps that are not assigned and are Win32 Apps. | |
| The user can select the apps to delete. There is standard output as well as a | |
| CMTrace compatible Logfile (Delete-UnusedIntuneApps-yyyy-m-dd.log) |
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
| <# | |
| .SYNOPSIS | |
| Wipes Intune Devices from a given computers.txt List. | |
| .DESCRIPTION | |
| Searches the DeviceID from a given computers.txt list in Intune. | |
| Found Devices will be wiped. There is standard output as well as a | |
| CMTrace compatible Logfile (Wipe-IntuneDevices-yyyy-m-dd.log) | |
| will be created in the ScriptRoot. | |
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
| param( | |
| [Parameter(Mandatory = $false)] | |
| [string]$CSVPath = "WindowsAutopilotDevices.csv", #TODO: Change back to full path | |
| [Parameter(Mandatory = $false)] | |
| [switch]$Force | |
| ) | |
| #region Variables | |
| $ScriptDirectory = Split-Path $MyInvocation.MyCommand.Path | |
| $LogFilePath = Join-Path $ScriptDirectory "Delete-AutopilotDevices-$(Get-Date -Format yyyy-M-dd).log" |
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
| param( | |
| [Parameter(Mandatory = $false)] | |
| [string]$CSVPath = "WindowsAutopilotDevices.csv", #TODO: Change back to full path | |
| [Parameter(Mandatory = $false)] | |
| [switch]$Force | |
| ) | |
| #region Variables | |
| $ScriptDirectory = Split-Path $MyInvocation.MyCommand.Path | |
| $LogFilePath = Join-Path $ScriptDirectory "Delete-AutopilotDevices-$(Get-Date -Format yyyy-M-dd).log" |
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
| $ComputerSystem = Get-CimInstance -Class Win32_ComputerSystem | |
| $Bios = Get-CimInstance -Class Win32_BIOS | Select-Object SerialNumber | |
| $CSV = "{0},{1},{2}" -f $ComputerSystem.Manufacturer, $ComputerSystem.Model, $Bios.SerialNumber | |
| $CSV |
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
| meinfile |
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
| Function Get-EnrollmentID { | |
| $baseKeyPath = 'HKLM:\SOFTWARE\Microsoft\Enrollments' | |
| $searchValueName = 'ProviderID' | |
| $searchValueData = 'MS DM Server' | |
| # Get all subkeys under the base key | |
| $subkeys = Get-ChildItem -Path $baseKeyPath -Recurse | Where-Object { $_.PSIsContainer } | |
| # Iterate through each subkey |
NewerOlder