Category: PowerShell

O365: Enable Mailbox Auditing on all Mailboxes

There is a slight annoyance with O365 with how to enable mailbox auditing for all mailboxes.  Setting mailbox auditing is required as by default mailbox auditing in O365 isn’t turned on by default, and as such will not appear in the search results when you search the O365 audit log for mailbox activity.  I also…



O365: My “Shared Mailbox Maintenance” Script

I have been doing a lot of work recently for a client on Office 365, and as part of my role, I have to provide some first line support when required.  Some of the tasks are really basic but very repetitive – like adding user access to Shared Mailboxes.  After a while I was getting…



How To Install The Azure AD PowerShell Module

This blog post will explain how to Install the Azure AD PowerShell Module. It is very simple to do, but I found this documentation a little difficult to find so I am blogging it here so that I can easily find it! Firstly make sure to start PowerShell as Administrator: The next step is to…



Where is my O365 mailbox hosted?

I was wondering as part of my testing on my private O365 tenancy, how I could find out where in the world my mailbox was being hosted.  It is actually relatively simple to do – all you need to do is open PowerShell and get a connection to Exchange Online:

If you run the…



Enable Clutter On Office 365 With PowerShell

If you need to enable Clutter for a single user (or even the whole organisation!) on O365, then it can be done very easily with PowerShell:

Easy peasy 🙂



AD: Find Active Directory Lockouts

Recently I had a customer that kept getting their account locked out, due to someone try to brute force their way into the company by using the OWA portal that is hosted by their on-premise Exchange Server.  Initially trying to find this information was quite tricky and I found a really useful set of PowerShell…



PowerShell: Connect Virtual Machines to a New Switch

I have decided to expand on this post a little: https://www.remilner.co.uk/2017/02/22/powershell-list-all-hyper-v-virtual-machines-along-with-the-connected-switch/, which explains how to list all Hyper-V Virtual Machines along with the connected Virtual Switch.  I ran into an issue today, where one of the Virtual Interfaces on my Cisco UCS had an issue and therefore required to flip all my Virtual Machines onto…



PowerShell: Check if O/S is 32 or 64 bit

I was on a client site doing a PowerShell script for an application that could potentially be deployed to either a Windows 7 32-bit or a Windows 7 64-bit, and I was looking for a very simple method of checking to see whether the Operating System was 32-bit or 64-bit, as that would dictate the…



SharePoint Online Group Permissions

Recently, I wanted to dig into whom had full access to one of our SharePoint sites.  I noticed that by default it seems that the groups named Company Administrator and SharePoint Service Administrator get access to the SharePoint site by default.  This was a potential security risk, given the sensitive nature of some of the…



PowerShell: Get all AD users last logon time

If you like me sometimes get asked to clean up some stale AD accounts, then on of the easiest ways to do this is by finding out when people last logged and authenticated against a Domain Controller.  Usually I take a stance of if the last logon date is more than a year ago, then…