# Deleteditemflags

**URL:** <https://forums.powershell.org/t/deleteditemflags/1522>\
**Category:** PowerShell Help\
**Created:** [December 31, 2011, 6:30pm UTC](https://forums.powershell.org/t/deleteditemflags/1522 "2011-12-31T18:30:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![archives](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@archives](https://forums.powershell.org/u/archives)\
**Post date:** [December 31, 2011, 6:30pm UTC](https://forums.powershell.org/t/deleteditemflags/1522/1 "2011-12-31T18:30:00Z")

</div>

by mrtanz at 2012-09-02 21:51:35

> Hi All  
>   
> I have dabbling powershell and can do AD activites such as changing set attributes of users however now i need to create a script for Exchange 2010  
>   
> The idea of the script is to change the deletedflags attribute to \<Not set\>  
> I can do this via vbs by using objUser.PutEx ADS\_PROPERTY\_CLEAR, "deletedItemFlags", 0  
>   
> But i havent been able to get it through powershell. From what i can see this attribute is not a common attribute and involves setting other attributes.  
>   
> Appreciate any help

by poshoholic at 2012-09-04 05:44:38

> You should probably review the section titled **Modifying the Deleted Item Retention period for a mailbox using the Exchange shell** on this blog post:  
>   
> http://exchangepedia.com/blog/2008/09/configuring-deleted-item-retention.html  
>   
> It describes the parameters you need to use with **Set-Mailbox** to change the deleted item retention period (which is what you’re doing when you change deletedItemFlags in that VB script).

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 9:02pm UTC](https://forums.powershell.org/t/deleteditemflags/1522/2 "2024-05-16T21:02:17Z")

</div>

Closed on May 16, 2024, 9:02pm UTC


