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

Must have PowerShell Tool for SysAdmins

Hey Guys, as a Windows SysAdmin some of your primary tools is Active Directory and PowerShell. I want to share this tool I found online from Patrick Gruenauer – Author of https://sid-500.com/ You can download the tool from here: https://sid-500.com/2018/05/22/active-directory-domain-services-section-version-1-1/ Active Directory Domain Services Section What can we do with it? This is the question for this part. I wanna […]

Read more

Useful PowerShell Scripts/Commands

Step 1: Get-Help, Get-Command, Get-Member and Get-Alias Thanks to Justin for pointing out that I left out probably the most useful command. Get-Help. I’ve added some of my other favorite commands for learning as well, which I still use almost daily. Get-Help is an amazingly useful command and is quite versatile. Get-Help Get-WMIObject – Will output basic help and tips […]

Read more

Disable the Clutter feature in O365 mailboxes

To disabled the clutter feature in a user’s O365 mailbox run the following command:   Turn off Clutter for single user Get-Mailbox –identity someone@somewhere.com | Set-Clutter -enable $false    OR   Single mailbox: Set-Clutter -Identity <user name> -Enable $false      If you want to disable this feature for all users in your tenant as an admin, you can do this with […]

Read more

Delete all Calendar events from a mailbox

Connect to O365 using powershell first   Open PowerShell or EMS If this is an O365 mailbox, you will need to connect to the O365 environment Connect to Exchange On-line From the PowerShell console on an Exchange 2010 server: $Cred = Get-Credential  $s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic –AllowRedirection  Import-PSSession $s    Then run this command in powershell: Search-Mailbox -identity “UsersMailbox” -SearchQuery kind:meetings -DeleteContent   

Read more
1 2 3 4 11