Skip to content

Instantly share code, notes, and snippets.

@Pome-ro
Last active August 17, 2021 14:44
Show Gist options
  • Save Pome-ro/ee9d4509a53167c24fdc79c4f5a0d66d to your computer and use it in GitHub Desktop.
Save Pome-ro/ee9d4509a53167c24fdc79c4f5a0d66d to your computer and use it in GitHub Desktop.
<#
The CSV should have a list of serialnumbers
#>
$CSV = "~\Desktop\devices.csv"
$Devices = Import-Csv $CSV
$OU = ""
foreach ($SerialNumber in $Devices) {
Write-Host "Modifying " $Item "to $OU" -ForegroundColor Green
$Query = "query:id:" + $SerialNumber
## Update Device OU
#C:\gam\gam.exe update cros $Query ou $OU
## Disable Device
#C:\gam\gam.exe gam update cros $Query action disable
## Deprovision Device
#C:\gam\gam.exe gam update cros $Query action deprovision_retiring_device acknowledge_device_touch_requirement
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment