gam <UserTypeEntity> update label search <RegularExpression> replace <LabelReplacement> [merge]
I noticed a function in the code that seems to scan a user's labels and fix the Inbox/ nesting issue that frequently results due to migrating to Google Apps from a legacy email system. I didn't notice any documentation in the Wiki, so I wanted to come here to inquire about using this functionality. I've attached a screenshot showing the respective code as well.Thanks!
--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/3e17306a-d22e-4e3f-8c84-ae4218888e4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Joshua,What are you trying to accomplish? Here is the command syntax.gam <UserTypeEntity> update label search <RegularExpression> replace <LabelReplacement> [merge]
At it's simplest, <RegularExpression> is the old label name, and <LabelReplacement> is the new label name.To change the label "Foo" to a new label "Bar" (the label "Bar" must not already exist):gam user us...@domain.com update label search "Foo" replace "Bar"If there is any chance that "Foo" may appear in the middle of a label, you can anchor the search <RegularExpressions>with ^ and $ so that only "Foo" exactly matches.gam user us...@domain.com update label search "^Foo$" replace "Bar"To change the label "Foo" to an existing label "Bar", use the merge option.gam user us...@domain.com update label search "^Foo$" replace "Bar" mergeIf you want to use part of an old label name in the new label name, you isolate the portion of the old label name you want to keepand indicate in the new label name where the isolated portion goes. In search <RegularExpression> there should be one instance of aparenthesized expression, e.g., (.*). In replace <String>, %s indicates where the isolated portions goes.gam user us...@domain.com update label search "^INBOX/(.*)$" replace "O365/%s"Ross
On Fri, Mar 9, 2018 at 9:35 AM, Joshua Adair <joshua.s...@gmail.com> wrote:
I noticed a function in the code that seems to scan a user's labels and fix the Inbox/ nesting issue that frequently results due to migrating to Google Apps from a legacy email system. I didn't notice any documentation in the Wiki, so I wanted to come here to inquire about using this functionality. I've attached a screenshot showing the respective code as well.Thanks!
--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/3e17306a-d22e-4e3f-8c84-ae4218888e4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Graham Ingleby | | | Google Cloud Consultant | | | +44 1344 203395 | | | ging...@ancoris.com |
Subscribe to our blog and receive our latest articles straight to your inbox
Powered by Ancoris Signatures
Thanks again!
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsubscribe...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/3e17306a-d22e-4e3f-8c84-ae4218888e4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/e5aa14b1-c379-41a7-8c81-a09e4d9e04f4%40googlegroups.com.
This message is for the named person's use only. If you receive this message in error, please delete it and notify the sender. Ancoris reserves the right to monitor all e-mail communications through its networks. Ancoris Limited, Registered in England Number: 04830784, Registered address: 5a Frascati Way, Maidenhead, Berkshire SL6 4UY. Trading Address: Lily Hill House, Lily Hill Road, Bracknell, Berkshire RG12 2SJ