This repository contains an enhanced version of the Get-WindowsAutoPilotInfo
script, originally from the PowerShell Gallery. The main enhancement is the addition of a backslash escape feature for GroupTags, allowing the use of GroupTags like "XXX\XXX" without issues.
- All original functionality of the Get-WindowsAutoPilotInfo script
- Improved handling of GroupTags containing backslashes
To use this enhanced version:
- Download the
Get-WindowsAutoPilotInfo.ps1
file from this repository. - Replace the original script file located at
C:\Program Files\WindowsPowerShell\Scripts\Get-WindowsAutoPilotInfo.ps1
with the downloaded file.
This script is intended to replace the original script in your system. Make sure to backup the original script before replacing it.
The main change is in the handling of the GroupTag parameter. The relevant code snippet now looks like this:
$imported += Add-AutopilotImportedDevice -serialNumber $_.'Device Serial Number' -hardwareIdentifier $_.'Hardware Hash' -groupTag ($_.'Group Tag' -replace '\\', '\\') -assignedUser $_.'Assigned User'
This modification allows for the correct handling of GroupTags containing backslashes.
All credits for the original script go to the authors at the PowerShell Gallery. This repository only adds the escape feature for improved GroupTag handling.
This project is licensed under the MIT License. See the LICENSE file for details.
This is an unofficial enhancement. Always ensure you're using scripts from trusted sources and test thoroughly in a non-production environment before deploying to production systems.