删除Exchange Online和 OneDrive 脚本文件

适用于: ✔️会议✔️网络研讨会✔️市政厅

在 Microsoft Teams 中,会议脚本文件的当前存储位置称为Exchange Online脚本或基底脚本。 Exchange Online脚本将在 2024 年弃用。 新的存储位置将是 OneDrive。

本文介绍如何删除 Exchange Online 和 OneDrive 中的会议脚本文件。

使用 XML 删除Exchange Online脚本文件

需要使用 EWS API 删除保存在Exchange Online上的脚本文件。 有关 API 说明的详细信息,请参阅 Exchange 中的 EWS 操作

听录文件的结构将是: Root\ApplicationDataRoot\93c8660e-1330-4e40-8fda-fd27f9eafe10\MeetingTranscriptCollection\

  1. 使用以下代码示例查找 ParentFolderId (ApplicationDataRoot) :

    <?xml version="1.0" encoding="utf-8"?>    
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> 
         <soap:Header> 
           <t:RequestServerVersion Version="Exchange2010_SP2" /> 
         </soap:Header> 
         <soap:Body> 
           <m:FindFolder Traversal="Shallow"> 
             <m:FolderShape> 
               <t:BaseShape>IdOnly</t:BaseShape> 
               <t:AdditionalProperties> 
                 <t:FieldURI FieldURI="folder:DisplayName" /> 
               </t:AdditionalProperties> 
             </m:FolderShape> 
             <m:IndexedPageFolderView MaxEntriesReturned="50" Offset="0" BasePoint="Beginning" /> 
             <m:Restriction> 
                 <t:IsEqualTo> 
                   <t:FieldURI FieldURI="folder:DisplayName" /> 
                   <t:FieldURIOrConstant> 
                     <t:Constant Value="ApplicationDataRoot"/> 
                   </t:FieldURIOrConstant> 
                 </t:IsEqualTo> 
             </m:Restriction> 
             <m:ParentFolderIds> 
               <t:DistinguishedFolderId Id="root" /> 
             </m:ParentFolderIds> 
           </m:FindFolder> 
         </soap:Body> 
       </soap:Envelope> 
    
  2. 查找 MeetingIntelligenceApp 文件夹 ID:“93c8660e-1330-4e40-8fda-fd27f9eafe10”,如以下代码示例所示:

    <?xml version="1.0" encoding="utf-8"?> 
       <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> 
         <soap:Header> 
           <t:RequestServerVersion Version="Exchange2010_SP2" /> 
         </soap:Header> 
         <soap:Body> 
           <m:FindFolder Traversal="Shallow"> 
             <m:FolderShape> 
               <t:BaseShape>AllProperties</t:BaseShape> 
               <t:AdditionalProperties> 
                 <t:FieldURI FieldURI="folder:DisplayName" />
            </t:AdditionalProperties> 
              </m:FolderShape> 
              <m:IndexedPageFolderView MaxEntriesReturned="50" Offset="0" BasePoint="Beginning" /> 
             <m:Restriction> 
               <t:IsEqualTo> 
                 <t:FieldURI FieldURI="folder:DisplayName" /> 
                 <t:FieldURIOrConstant> 
                   <t:Constant Value="93c8660e-1330-4e40-8fda-fd27f9eafe10"/> 
                 </t:FieldURIOrConstant> 
               </t:IsEqualTo> 
           </m:Restriction> 
           <m:ParentFolderIds> 
     <t:FolderId Id="AQMkADRhOWIyODBmLTQzMDEtNDc5Yi1iNTY2AC0zYWM4YjNhMjhkNWMALgAAA784AonxS+lBuntvnROGrHMBACDUFKCn6g9ItmL6JTlNKDAAAAIBIgAAAA==" ChangeKey="AQAAAA==" /> 
           </m:ParentFolderIds> 
         </m:FindFolder> 
       </soap:Body> 
     </soap:Envelope> 
    
  3. 使用以下代码示例查找 MeetingTranscriptCollection 文件夹 ID:

    <?xml version="1.0" encoding="utf-8"?> 
     <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> 
       <soap:Header> 
         <t:RequestServerVersion Version="Exchange2010_SP2" /> 
       </soap:Header> 
       <soap:Body> 
         <m:FindFolder Traversal="Shallow"> 
           <m:FolderShape> 
             <t:BaseShape>AllProperties</t:BaseShape> 
             <t:AdditionalProperties> 
               <t:FieldURI FieldURI="folder:DisplayName" /> 
             </t:AdditionalProperties> 
           </m:FolderShape> 
           <m:IndexedPageFolderView MaxEntriesReturned="50" Offset="0" BasePoint="Beginning" /> 
           <m:Restriction> 
               <t:IsEqualTo> 
                 <t:FieldURI FieldURI="folder:DisplayName" /> 
                 <t:FieldURIOrConstant> 
                   <t:Constant Value="MeetingTranscriptCollection"/> 
                 </t:FieldURIOrConstant> 
               </t:IsEqualTo> 
           </m:Restriction> 
           <m:ParentFolderIds> 
     <t:FolderId Id="AAMkADRhOWIyODBmLTQzMDEtNDc5Yi1iNTY2LTNhYzhiM2EyOGQ1YwAuAAAAAAC/OAKJ8UvpQbp7b50ThqxzAQAg1BSgp+oPSLZi+iU5TSgwAAF1f4tpAAA=" ChangeKey="AQAAABYAAAAg1BSgp+oPSLZi+iU5TSgwAATlHZy8"/> 
           </m:ParentFolderIds> 
         </m:FindFolder> 
       </soap:Body> 
     </soap:Envelope> 
    
  4. 通过删除 MeetingTranscriptCollection 文件夹删除用户的所有听录文件,如以下代码示例所示:

    <?xml version="1.0" encoding="utf-8"?> 
     <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> 
       <soap:Header> 
         <t:RequestServerVersion Version="Exchange2016" /> 
       </soap:Header> 
       <soap:Body> 
         <m:DeleteFolder DeleteType="HardDelete"> 
           <m:FolderIds> 
             <t:FolderId Id="AAMkAGUzNDY1MjY4LTRmNjItNGQ1Ni05YzE4LTE1NDlmYzFiZmFmYgAuAAAAAAC+Ct50+goBS4yeyX/xvq9QAQDhHjGubgXIQZeXAlxCHvQOAACwZS4iAAA=" ChangeKey="AQAAABYAAADhHjGubgXIQZeXAlxCHvQOAACwOP/U" /> 
           </m:FolderIds> 
         </m:DeleteFolder> 
       </soap:Body> 
     </soap:Envelope> 
    

使用 XML 删除特定脚本文件

  1. 按照上一部分中提到的前三个步骤获取 MeetingTranscriptCollection 文件夹 ID

  2. 现在,使用以下代码示例查找基于 threadId + DateTimeCreated 的脚本:

    <?xml version="1.0" encoding="utf-8"?> 
     <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> 
       <soap:Header> 
         <t:RequestServerVersion Version="Exchange2010_SP2" /> 
       </soap:Header> 
       <soap:Body> 
         <m:FindItem Traversal="Shallow"> 
           <m:ItemShape> 
             <t:BaseShape>AllProperties</t:BaseShape> 
             <t:AdditionalProperties> 
               <t:ExtendedFieldURI PropertySetId="2842957e-8ed9-439b-99b5-f681924bd972" PropertyName="RawJSON" PropertyType="String" /> 
             </t:AdditionalProperties> 
           </m:ItemShape> 
           <m:Restriction> 
     <t:And> 
              <t:Contains ContainmentMode="Substring" ContainmentComparison="IgnoreCase"> 
               <t:ExtendedFieldURI PropertySetId="2842957e-8ed9-439b-99b5-f681924bd972" PropertyName="RawJSON" PropertyType="String" /> 
                <t:Constant Value="19:meeting_ZWRmMGVkMDctNTI0NS00NmQ4LWJjMDgtMDA5MjVhMzE0ZjJl@thread.v2"/> 
              </t:Contains> 
             <t:GreaterThanOrEqual> 
               <t:FieldURI FieldURI="item:DateTimeReceived" /> 
               <t:FieldURIOrConstant> 
                 <t:Constant Value="2022-12-28T00:00:00Z" /> 
               </t:FieldURIOrConstant> 
             </t:GreaterThanOrEqual> 
     </t:And> 
           </m:Restriction> 
           <m:ParentFolderIds> 
                     <t:FolderId Id="AAMkAGUzNDY1MjY4LTRmNjItNGQ1Ni05YzE4LTE1NDlmYzFiZmFmYgAuAAAAAAC+Ct50+goBS4yeyX/xvq9QAQDhHjGubgXIQZeXAlxCHvQOAAEP+YkQAAA=" /> 
           </m:ParentFolderIds> 
         </m:FindItem> 
       </soap:Body> 
     </soap:Envelope> 
    
  3. 使用以下示例代码删除脚本:

    <?xml version="1.0" encoding="utf-8"?> 
     <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> 
       <soap:Header> 
         <t:RequestServerVersion Version="Exchange2010_SP2" /> 
       </soap:Header> 
       <soap:Body> 
         <m:DeleteItem DeleteType="HardDelete"> 
           <m:ItemIds> 
             <t:ItemId Id="AAMkAGUzNDY1MjY4LTRmNjItNGQ1Ni05YzE4LTE1NDlmYzFiZmFmYgBGAAAAAAC+Ct50+goBS4yeyX/xvq9QBwDhHjGubgXIQZeXAlxCHvQOAACwZS4iAADhHjGubgXIQZeXAlxCHvQOAAEP+bwSAAA=" /> 
           </m:ItemIds> 
         </m:DeleteItem> 
       </soap:Body> 
     </soap:Envelope> 
    

使用 EWSEditor 删除脚本

还可以按照以下步骤使用 EWSEditor 开放源代码 工具删除会议脚本:

  1. 使用客户端应用 ID 登录:“d3590ed6-52b3-4102-aeff-aad2292ab01c”。

    选择“ 验证机构 ”,让租户管理员控制租户中用户的数据。

  2. 选择“ 按已知名称标识文件夹 ”,然后选择“ ”作为“文件夹名称”,并提供 SMTP 地址。

  3. 找到听录文件夹并右键单击以删除。 若要在窗格中查看更多详细信息,请双击听录文件夹。

使用 EWSEditor 删除特定脚本

若要标识特定会议,用户可以检查 DateTimeCreated。 此外,他们可以通过执行以下步骤检查项目的 threadId:

  1. 在顶部工具栏中选择“ 视图 ”,然后选择 “配置详细信息属性集...”

  2. “属性 集编辑器”窗格中选择“添加扩展属性”,然后选择“ 确定”。

    在“扩展属性定义”窗格中的“属性标识符”下提供以下详细信息,然后选择“ 确定”

    • 名称或 ID:RawJSON
    • 属性集:2842957e-8ed9-439b-99b5-f681924bd972
    • 属性类型:字符串
  3. 返回到 EWSEditor,新属性将在窗格的下半部分显示其原始 JSON 字符串。

  4. 双击 属性以在新窗口中打开它,并检查 threadId。

通过 Microsoft Purview 删除 OneDrive 和 SharePoint 中的脚本副本

可以选择使用 自动应用保留标签策略 删除 Teams 会议录制及其随附的脚本,该策略从 OneDrive 和 SharePoint 脚本或 OneDrive 脚本中标识这些文件。 有关详细信息,请参阅 自动将保留标签应用于 Microsoft 365 项

下面是最相关的部分,可帮助你入门:

注意

在 Microsoft Purview 中创建保留标签策略时,最短保留期为 1 天,这意味着仅会在 1 天后删除录制内容和随附的脚本。