Hi, I'm new to GAM, and don't speak command line all that well haha.. I'm needing to move a bunch of devices from our root OU to multiple other OUs. I have a csv file that has "SerialNumber" and "TargetOU" headers, with all of the SNs, and each of the target OUs. I can reach all of my target OUs and my root OU using the "gam info org #" command, where # is the particular path.
When I run my batch file, this is what I get in the command line:
moving 1 devices to //TargetOU
ERROR: 400: Invalid Input: INVALID_OU_ID - invalid
PyInstaller\loader\pyimod02_importers.py:352: UserWarning: You are using cryptography on a 32-bit Python on a 64-bit Windows Operating System. Cryptography will be significantly faster if you switch to using a 64-bit Python.
moving 1 devices to //Students/Elementary/PJE/PK
This is what I have in my batch file:
@echo off
set GAM_PATH="C:\GAM\gam.exe"
set CSV_FILE=C:\Users\ralstong\Documents\chromebooks.csv
set SOURCE_OU=/
rem Ensure you have the necessary headers in the CSV file:
rem SerialNumber,TargetOU
rem Loop through the CSV file and move each Chromebook from the root OU to its target OU
for /f "tokens=1,2 delims=," %%i in (%CSV_FILE%) do (
"%GAM_PATH%" update cros %%i org "%SOURCE_OU%/%%j"
)
echo Chromebooks moved from %SOURCE_OU% to their target OUs based on the CSV file.
I'm unsure of where I'm going wrong since I can reach each OU individually. Is it that I'm using regular GAM rather than Advanced GAM?