syntax for deleting multiple calendars

107 views
Skip to first unread message

Brian Gray

unread,
Aug 23, 2021, 9:43:15 AM8/23/21
to GAM for Google Workspace
We are retiring several resource calendars, and I need to remove them from users' calendar lists.  

I can delete the calendars one by one, but I want to do more than one at a time if possible.  The "delete calendars" command implies that I should be able to do this by listing the calendar IDs for multiple calendars, but I can't get the syntax for the CalendarList quite right.  The wiki implies that it's a comma separated list of calendar IDs


The result is:

It appears that GAM is interpreting the list as a single calendar ID instead of a list of IDs.

The calendar IDs are valid. I can delete the calendars one by one using those IDs.

What's the magic incantation for this?

GAMADV-XTD3 6.07.12 on Windows 10 10.0.18363 SP0 Multiprocessor Free AMD64


Ross Scroggs

unread,
Aug 23, 2021, 10:40:32 AM8/23/21
to google-ap...@googlegroups.com
Brian,

If you want to specify a list of calendars you have to use the keyword calendars again.

gam <UserTypeEntity> delete calendars <UserCalendarEntity>

<UserCalendarEntity> ::=

        allcalendars|

        primary|

        <EmailAddress>|

        <UniqueID>|

(courses <CourseIDList>)|

        ((courses_with_teacher <UserItem>)|my_courses_as_teacher [coursestates <CourseStateList>])|

        ((courses_with_student <UserItem>)|my_courses_as_student [coursestates <CourseStateList>])|

        (coursestates <CourseStateList>)|

        (resource <ResourceID>)|

        (resources <ResourceIDList>)|

        ((calendars <CalendarList>) | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>)|

        <CalendarSelectProperty>*


Ross




--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/126f2a69-aee3-4faa-b040-05a69cb7ccbcn%40googlegroups.com.


--

Brian Gray

unread,
Aug 23, 2021, 11:57:56 AM8/23/21
to GAM for Google Workspace

Got it.  Thanks!
Reply all
Reply to author
Forward
0 new messages