January 2017

A chart describing CIDR subnets

Admins need to understand some basic networking concepts like CIDR. These are needed when working with AntiSpam & Archiving providers. Here is a simple chart describing the CIDR subnets.

In networks larger than a /31, one address is used for the network number, another for the broadcast address, and generally another as the default gateway for routing to other networks. A /29 may cover a range of 8 addresses, but only 5 of them can be used as host endpoints. A /30 has only 1 usable address.

Delete Files and Folders Older Than X Days

Often times admin have to creates tasks like removing log files or some other files on a regular schedule. Here is an automated way of removing files / folders older than X days.

Create a Batch file or Powershell script and add it to scheduled task.

Please check permissions on the files and folders. If you have unique or specialized permission on the file or folders these wont work.

Batch File:



Set password never to expire for users in a particular domain (Bulk mode)

Let me start by saying that I don’t recommend doing this at all.

Password Never Expires is bad security practice, but there are situations that might require it.

I had a similar request on how this could be done.

Setting it for multiple users:

Setting it for a single user:


Get PasswordAge for users in a particular domain

In Office365 if you have more than one domain in a subscription, there are times where you may want to get the password age for users of that domain.

In my case to check which users are covered and meeting policy and get the users addressed.

The output will be similar to: