Instantly share code, notes, and snippets.

View Get-WindowsAutoPilotInfoAndUpload.ps1
<#
Version: 1.0
Author: Oliver Kieselbach
Script: Get-WindowsAutoPilotInfoAndUpload.ps1
Description:
Get the AutoPilot information and copy it to an Azure Blob Storage. Use existing AzCopy.exe and
Get-WindowsAutoPilotInfo.ps1 files or download them from an Azure Blob Storage named 'resources'.
If used with an MDT offline media the hash can be written to the offline media as well.
View Import-AutoPilotInfo.ps1
<#
Version: 1.0
Author: Oliver Kieselbach
Runbook: Import-AutoPilotInfo
Description:
Get AutoPilot device information from Azure Blob Storage and import device to Intune
AutoPilot service via Intune API running from a Azure Automation runbook.
Cleanup Blob Storage and send import notification to a Microsoft Teams channel.
View Invoke-RetireDevice.ps1
<#
Version: 1.0
Author: Oliver Kieselbach
Runbook: Invoke-RetireDevice
Description:
Delete device from Intune via Intune API and AAD from a Azure Automation runbook.
Release notes:
Version 1.0: Original published version.
Version 1.1: Bugfix, escaped ' on delete request, thanks Sandy!
View Unregister-DOScript.ps1
<#
Version: 1.0
Author: Oliver Kieselbach
Script: Unregister-DOScript.ps1
Description:
Unregister the scheduled task and delete DO registry key
Release notes:
Version 1.0: Original published version.
View Register-DOScript.ps1
<#
Version: 1.1
Author: Oliver Kieselbach
Script: Register-DOScript.ps1
Description:
Register a PS script as scheduled task to query DHCP for option 234 to get Group ID GUID
Release notes:
Version 1.0: Original published version.
View IntunePSTemplate.ps1
<#
Version: 1.1
Author: Oliver Kieselbach
Script: IntunePSTemplate.ps1
Description:
Intune Management Extension - PowerShell script template with logging,
error codes, standard error output handling and x64 PowerShell execution.
Release notes: