Skip to content

Category: Active Directory

Add and Remove Distribution Group Members Powershell

Add and Remove Distribution Group Members Powershell   Lets look at some quick Powershell one liners to Remove and Add Distribution Group Members. Add DistributionGroup Member:

Remove DistributionGroup Member:

  Quick and Simple One liners.   #ThatLazyAdmin

Leave a Comment

Remove Exchange 2010 Inbox Rules

Remove Exchange Inbox Rules using PowerShell Lets look at a quick way to view , remove and disable user inbox rules. First lets get  list of inbox rules for a user by running the below:

To disable one of the Inbox Rules run the following:

Next lets view the description of the Inbox…

Leave a Comment

Set Office 365 Out Of Office using PowerShell

Set Office 365 Out Of Office Messages using PowerShell Connect to Office 365 PSSession using a script a created to simplify the connection :Connect-Office365-PSSession  

Images when script is executed Very simple and straight forward script to quickly and easily set OOF messages. TechNet Script can be downloaded here :SetO365OOF #ThatLazyAdmin

Leave a Comment

Set DNS using Powershell

The purpose of this article is to show case how to add a new A record to a DNS zone using PowerShell. Here is a quick look at the available Syntax for : Add-DnsServerResourceRecordA Add-DnsServerResourceRecordA [-AllowUpdateAny] [-CreatePtr] [-Name] <String> [-IPv4Address] <IPAddress[]> [-ComputerName <String>] [-TimeToLive <TimeSpan>] [-ZoneName] <String> [-AgeRecord] [-PassThru] [-ZoneScope <String>] [-VirtualizationInstance <String>] [-CimSession <CimSession[]>]…

Leave a Comment

Get Domain Group Members

The following Script was created to assist a help desk department to quickly get a list of ‘Members’ from an Active Directory Group. This is a very simple script that prompts you for a Group Name and will then use Grid-View to display the results. Original Post : https://gallery.technet.microsoft.com/Get-Domain-Group-Members-bf33a1a2?redir=0 GetGroupMembers #ThatLazyAdmin

Leave a Comment

While there is no simple way of addressing ransomware entirely, there are number of measures that all organisations can take to help spot and mitigate the risk and spread of such an attack. LepideAuditor offers probably the easiest, fastest (and most cost effective) means of spotting and reacting to potential ransomware attacks on your Windows…

Leave a Comment

Adding Subnets Active Directory Sites and Services :PowerShell

This guide will show you how to add additional Subnets into Active Directory Sites and Services using GUI as well as Powershell. Let’s start by adding the following Subnet into Sites and Services using GUI. Subnet : 192.168.56.0/24 and 192.168.57.0/24 Launch Active Directory Site and Services and Navigate to Subnets. Right click on “Subnets” and…

2 Comments

Search for Disabled Users and Move to Disabled Ou using PowerShell

Search for Disabled Users and Move to Disabled Ou using PowerShell Created this script to search a ‘OU’ for disabled users and move them to a different ou . I have added the ‘WhatIf’ option by default . Once you run the script it will prompt for ‘Search OU’ and ‘Target OU’ .

Leave a Comment

Set UPN Suffix using PowerShell

To Prepare for Office 365 Migration you need to add the missing ‘UPN Suffixes’. The following example demonstrates how to create a new UPN suffix for the users in the ThatLazyAdmin forest: Lets Start by running:

  Then run :

  Lets verify the new UPN in Active Directory Users and Computers   There…

Leave a Comment