Scripts

Get file or folder permissions using PowerShell

The Get-Acl cmdlet in PowerShell’s Security module (Microsoft.PowerShell.Security) does a great job of getting file or folder permissions (aka the Access Control List or ACL). But getting useful info from the default output can take some getting used to. Instead, it’d be great to simply be able to see what the Security tab of a […]

More →

Use a PowerShell function to find an email address in Exchange

Exchange admins frequently need to find an Exchange recipient with a specified email address, particularly for generic organizational addresses such as [email protected]. Five and a half ways to find an email address in Microsoft Exchange and Active Directory lists a few ways to do it, including PowerShell. If you do this frequently, you can add […]

More →

Use a PowerShell function to get AutoDiscover XML

If you manage Exchange or support Exchange Online users, you may need to retrieve the AutoDiscover XML response. You can use the Test E-mail AutoConfiguration option in Outlook or the AutoDiscover tests in Microsoft Remote Connectivity Analyzer to retrieve the AutoDiscover response. The good news is you can also use a PowerShell one-liner or function […]

More →

Synchronize your PowerShell Profile with OneDrive

I make frequent changes to my PowerShell profile and like to have the same PowerShell envirnoment on all computers that I use PS from. To accomplish this, I used to copy the PowerShell profile to a folder on OneDrive and copy it back to the WindowsPowerShell folder on other computers – first, manually, and then […]

More →

Connect to Office 365 Using a PowerShell Function

When you sign-up for Exchange Online (or Office 365, which includes Exchange Online), an Exchange organization is created for you in Microsoft’s datacenter. One of the really cool things about Exchange Online is that besides its easy-to-use web interface, you also have the ability to manage your cloud-based organization using PowerShell. Shell-savvy administrators can run […]

More →

Script: Save all Internet Explorer tabs as Favorites

We spend a lot of time in web browsers and if you’re like me, you probably have a gazillion tabs open – your work stuff, your social media sites, sites for e-learning, e-banking, e-commerce, a few blogs, publications and news sites, sites you’re trying to quote material or save useful tidbits from. Suddenly, the browser […]

More →

SCRIPT: List Delegates With Send On Behalf Access

Send On Behalf access allows a user to send mail on behalf of the mailbox owner. Figure 1: Send On Behalf access can be assigned from ADUC | recipient properties | Exchange General | Delivery Options, or by the mailbox owner using Microsoft Outlook Here’s a script that lists all users with delegates. File: listDelegates.zip […]

More →

SCRIPT: Get Storage Group Backup Status

Exchange 2007 Mailbox Databases expose backup-related properties using the Get-MailboxDatabase cmdlet: Get-MailboxDatabase “My Database” -status | select *backup* | fl What you get back:BackupInProgress :SnapshotLastFullBackup :SnapshotLastIncrementalBackup :SnapshotLastDifferentialBackup :SnapshotLastCopyBackup :LastFullBackup :LastIncrementalBackup :LastDifferentialBackup :LastCopyBackup : Here’s a quick shell script that dumps each Storage Group and its backup-related information. I haven’t had the time to build in […]

More →

Script: Listing Distribution Groups a recipient is a member of

It’s easy to get a list of all members of a Distribution Group. The Exchange shell (EMS) ships with the Get-DistributionGroupMember cmdlet that makes it a short one-liner (compared to 100s of lines of code in VBS). However, how do we get all Distribution Groups a user, group, or contact is a member of? There’s […]

More →

HOW TO: Remove the Public Folder Store

This is a fairly common question — you’re trying to remove the Public Folder store on an Exchange 2007 server and get an error that some Public Folder replicas still exist. You’re certain you’ve removed all Public Folder replicas from that server. What next? Here’s a little procedure documented in How to Delete Multiple Public […]

More →