Remove duplicates, blank lines, spaces, to get unique values and sort data in one operation

From time to time I come across this need; where I need to scrub a file where there are duplicates, there are blank lines, the sort order is all wack, and it just needs to be formatted to where it can be more readable and/or usable. This method just doesn’t apply to text, but also … Read moreRemove duplicates, blank lines, spaces, to get unique values and sort data in one operation

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 … Read moreA chart describing CIDR subnets

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. Batch File:

Powershell:

 

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:

How to force update GlobalAddressList in Office 365?

This post explains how to manually force and update the global address list in Office 365. Updating the global address list requires to have the Address List Management role. By default, nobody has this role. 1. Assign the AddressList Management role Login with your administrator account to the Office 365 portal. Go to Exchange Admin … Read moreHow to force update GlobalAddressList in Office 365?

Remove disabled users from Distribution Lists & Security Groups in Active Directory

One of my clients had several disabled users showing up in distribution lists and security groups and this was creating unnecessary noise in email, alerts, etc. I highly encourage all administrators to keep their AD neat and tidy. The following PowerShell script searches for disabled users in Groups and Distribution Groups and removes them:

Read moreRemove disabled users from Distribution Lists & Security Groups in Active Directory

Configure SNMP on an ESXi Host or multiple Hosts

Recently I needed to configure all of our 40 or so ESXi hosts to forward SNMP traps to our corporate monitoring solution. This meant enabling and configuring SNMP on each of the hosts. Naturally, I wrote a script for this as 40 hosts is way too many to do manually. This article shows you how … Read moreConfigure SNMP on an ESXi Host or multiple Hosts

Convert resource mailbox to a user mailbox

Based on my audit for a client I found that a user mailbox was at sometime converted to a resource mailbox. There is no convert button/ link to switch it back. I still don’t know how, or why this would have happened. Anyways, for someone who may come across this weird issue, here is the … Read moreConvert resource mailbox to a user mailbox

Find out ‘in cloud’ Distribution Groups

Microsoft Teams was announced yesterday and many want to jump right in. I noticed when users wanted to create teams, new distribution groups started getting added. I wanted to find out my ‘In cloud’ distribution groups and was surprised there was no property for the item.   I was able to find out the groups … Read moreFind out ‘in cloud’ Distribution Groups