Get DNS server IP’s using PowerShell

On servers, we use static IP configuration and static DNS configuration. If you have multiple sites in your environment, this list of DNS server IPs will vary from one site’s server to another. Given these, we sometimes end up with incorrect DNS IP entries in some of the servers. The script I am going to discuss will help you query […]

Read more

Connect to O365 v2 (EXO v2)

In order to Connect to O365 (EXO v2) using modern authentication you will need to install and import the EXO v2 module. ***PowerShell needs to have TLS 1.2 enabled in order to run EXO v2*** Run this in PowerShell:   [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Install-Module -Name ExchangeOnlineManagement -Force If you have this module already installed, then you just need to import it […]

Read more

How to Use PowerShell to Create AD User Accounts in Bulk in Windows Server 2016

Lets get started.. 1 – For this demo, I will use my existing AD Server with Windows.ae domain and previously created empty OU call Network Branch. My Network Branch OU is now empty without any User in it, so I would like to import 25 users in just 1 shot. 2 – For this step, you need a Notepad with Your Domain user information. This can be done in MS […]

Read more

How to Manage Microsoft Teams using PowerShell

Install the Teams PowerShell Module The first step in managing Teams via PowerShell is to install the Teams Cmdlets module.  Running PowerShell as an Administrator, you will need to run the following and allow install from the untrusted repo as well as installing the NuGet package: Install-Module -Name MicrosoftTeams Connect PowerShell to the Tenant The next step is to connect […]

Read more

Get a List of Shared Mailboxes Members and Permissions

If you want to get a list of members from an O365 shared mailbox using powershell, you can run either command to do so: Get-Mailbox “Shared Mailbox Name” | Get-MailboxPermission | where {$_.user.tostring() -ne “NT AUTHORITY\SELF” -and $_.IsInherited -eq $false} | Format-Table Identity, User, AccessRights –AutoSize OR Get-Mailbox “Shared Mailbox name” -ResultSize:Unlimited | Get-MailboxPermission |Select-Object Identity,User,AccessRights | Where-Object {($_.user -like […]

Read more

Join Linux to Active Directory with PowerShell Core

There are many possibilities for using PowerShell on non-Windows platforms now and today my mind was pondering how to use it to join Linux servers to Active Directory. So, I created a small little function that automates some of this called Join-LinuxToAD. Keep in mind I tested this only on CentOS 7. The script does the following: Ensures you can lookup the […]

Read more

PowerShell: Email me when Disk Space is running low on my Windows Servers (w/ SQL Server Integration)

Have you ever ran into a situation where your disk space on your Windows Server were running low and you had to constantly remote into the server to check the disk space? Now, imagine if you had to do this for 10-100 servers! holy crap. With this PowerShell script you can get an email notification when your disk space is […]

Read more

How to Expand the Recipient Scope in Exchange 2010/2013

You may find yourself in a situation where you have Exchange in a multi-domain environment, that when your running commands like get-mailbox it’s not displaying mailboxes across all the domains. You can sort that out by simply expanding your recipient scope, you can do that by running the below Open Exchange Management Console with Admin rights Run the command below […]

Read more

Create and Configure Virtual Machine with PowerShell

Create New Virtual Machine Let’s go to create the new virtual machine. Type new-vm -vmname test -memorystartupbytes 1GB Create Virtual Hard Drive new-vhd -path “C:\users\Public\Documents\Hyper-v\Virtual Hard Disks\test.vhdx” -sizebytes 20GB -fixed Use the -fixed to determine that your Virtual Hard Drive will be fixed. Because by default use Dynamic Virtual Hard Disk Type. After create the Virtual Hard Disk you will see […]

Read more

PowerShell: Alert me when Disk Space is running low on my Windows Servers (E-Mail Notification)

Have you ever ran into a situation where your disk space on your Windows Server were running low and you had to constantly remote into the server to check the disk space? Now, imagine if you had to do this for 10-100 servers! This script will send you email notifications with the status of your Windows Server disk space.

Read more
1 2 3 10