Remote switches, Internet of Things (IoT) and Smart home in general are quite trendy nowadays. There are plenty of trademarks and devices that allow you to switch lights, heating, garage doors etc via an application on your mobile / web page.
There is one very popular gadget among the Smart housers – the Sonoff. It is actually a trademark that includes various kinds of remote switches. Sonoff devices are getting more and more popular these days because they are small, cheap, cloud ready, easy to use and have built-in AD/DC converter (i.e. no external power supply is needed, just a cable to plug it in the grid). Some sonoffs can be controlled via RF keyfobs.
Sometimes we need to create users/groups/computers in Active Directory that will be used temporary (by a contractor, for testing etc.). The typical workflow is: Create > Use for a while > Delete. The deletion is manual and often these objects are being forgotten which poses some security risks.
It is little known fact that we can create the so called Dynamic objects (DOs, a.k.a. temporary objects) that get deleted from AD automatically when the associated TTL expires. Microsoft added this capability in Windows Server 2003. In fact the “Dynamic object” is an auxiliary class (OID = 126.96.36.199.4.1.14188.8.131.52). When linked to an object it adds some new attributes like the entryTTL (Entry-TTL) and ms-DS-Entry-Time-To-Die attribute.