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
| $frameWorkList = 'Microsoft.WindowsAppRuntime', 'Microsoft.UI.Xaml', 'Microsoft.VCLibs', 'Microsoft.NET.Native.Runtime', 'Microsoft.NET.Native.Framework', 'Microsoft.WindowsAppRuntime.CBS' | |
| foreach ($framework in $frameWorkList) { | |
| if($framework -eq 'Microsoft.WindowsAppRuntime') { | |
| $download = 'Microsoft.WindowsAppSDK' | |
| } | |
| else{ | |
| $download = $framework | |
| } |
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
| Add-Type -TypeDefinition @' | |
| using System; | |
| using System.Runtime.InteropServices; | |
| using System.Security.Cryptography.X509Certificates; | |
| public enum DSREG_JOIN_TYPE { | |
| DSREG_UNKNOWN_JOIN = 0, | |
| DSREG_DEVICE_JOIN = 1, | |
| DSREG_WORKPLACE_JOIN = 2 | |
| } |
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
| # ██████╗ ███████╗███╗ ███╗ ██████╗ ██╗ ██╗███████╗ ██╗ ██╗██████╗ | |
| # ██╔══██╗██╔════╝████╗ ████║██╔═══██╗██║ ██║██╔════╝ ██║ ██║██╔══██╗ | |
| # ██████╔╝█████╗ ██╔████╔██║██║ ██║██║ ██║█████╗ ███████║██████╔╝ | |
| # ██╔══██╗██╔══╝ ██║╚██╔╝██║██║ ██║╚██╗ ██╔╝██╔══╝ ██╔══██║██╔═══╝ | |
| # ██║ ██║███████╗██║ ╚═╝ ██║╚██████╔╝ ╚████╔╝ ███████╗ ██║ ██║██║ | |
| # ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═══╝ ╚══════╝ ╚═╝ ╚═╝╚═╝ | |
| # | |
| # ██████╗ ██╗ ██████╗ █████╗ ████████╗██╗ ██╗ █████╗ ██████╗ ███████╗ | |
| # ██╔══██╗██║ ██╔═══██╗██╔══██╗╚══██╔══╝██║ ██║██╔══██╗██╔══██╗██╔════╝ | |
| # ██████╔╝██║ ██║ ██║███████║ ██║ ██║ █╗ ██║███████║██████╔╝█████╗ |
Blog 2020/5/7
<- previous | index | next ->
EDIT 2024/12/1: I updated a few of these commands to work with qemu 9.x.
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
| #The resource URI | |
| $resource = "https://westus2.api.loganalytics.io" | |
| #Your Client ID and Client Secret obtained when registering your WebApp | |
| $clientid = "yourAADAppClientID" | |
| $clientSecret = "yourAADAppClientSecret" | |
| #Your Reply URL configured when registering your WebApp | |
| $redirectUri = "https://localhost" | |
| #Scope | |
| $scope = "Data.Read" | |
| Add-Type -AssemblyName System.Web |
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 | |
| Delete obsolete/stale device objects from Microsoft Intune/Azure AD | |
| .DESCRIPTION | |
| Based on input parameters ('management agent', 'compliance state' and 'management state', 'Days last synced') the script is used to perform "housekeeping" to keep your Microsoft Intune/Azure AD clean and tidy of obsolete/stale device objects. | |
| The script deletes device objects based on their device state, device compliance state, management channel and the number of days devices hasn't synced/connected to Microsoft Intune. | |
| .AUTHORS | |
| Name: Ronny de Jong |
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
| accesschk -w -s -u Users "C:\Program Files" >> programfiles.txt | |
| accesschk -w -s -u Everyone "C:\Program Files" >> programfiles.txt | |
| accesschk -w -s -u "Authenticated Users" "C:\Program Files" >> programfiles.txt | |
| accesschk -w -s -u Interactive "C:\Program Files" >> programfiles.txt | |
| accesschk -w -s -u "This Organization" "C:\Program Files" >> programfiles.txt | |
| accesschk -w -s -u "Authentication authority asserted identity" "C:\Program Files" >> programfiles.txt | |
| accesschk -w -s -u "Mandatory Label\Medium Mandatory Level" "C:\Program Files" >> programfiles.txt | |
| accesschk -w -s -u %username% "C:\Program Files" >> programfiles.txt | |
| accesschk -w -s -u Users "C:\Program Files (x86)" >> programfilesx86.txt |
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
| Add-Type -TypeDefinition @" | |
| using System; | |
| using System.IO; | |
| using System.Text; | |
| using System.Drawing; | |
| using System.Windows.Forms; | |
| using System.Runtime.InteropServices; | |
| using System.Linq; | |
| using Microsoft.Win32; |
NewerOlder