Quantcast
Channel: Scripts – Exchange Goodies
Browsing all 11 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Remove Spaces from Powershell Output

This one is great! If you have an output file with lots of trailing spaces, try the cmdlet below. (gc c:\scripts\test.txt) -replace ‘ {2,}’,” | sc c:\scripts\test.txt GC (Get-Content) reads the file....

View Article



Image may be NSFW.
Clik here to view.

Add users to a distribution group from a .txt file

get-content D:\evscripts\evmbxusers.txt | Add-DistributionGroupMember “tap Enterprise Vault Users”

View Article

Image may be NSFW.
Clik here to view.

Find empty AD security groups using Powershell

(I am using Quest ActiveRoles Management Shell) Get-QADGroup -GroupType Security -Empty $true If you want to count the number of results: Get-QADGroup -GroupType Security -Empty $true |measure-object

View Article

Image may be NSFW.
Clik here to view.

New Version of Quest ActiveRoles Management Shell Available! (1.5.1)

http://www.quest.com/powershell/activeroles-server.aspx

View Article

Image may be NSFW.
Clik here to view.

Count Results Of a cmdlet

In this simple example I want to count the number of users in the “Terminated Users” OU. I can do this in 2 parts: 1. Create a variable called “$terminated” in which to store the output. $terminated =...

View Article


Image may be NSFW.
Clik here to view.

Article 4

This script will remove any group members of “g_adobe_users” that are located in the OU called “terminated”: Get-QADUser -MemberOf “g_adobe_users” | where {$_.parentcontainerdn -match...

View Article

Image may be NSFW.
Clik here to view.

How to Add Quest Module to Native Powershell

http://desktopfeedbag.com/2008/08/02/how-to-add-quest-ad-tools-to-your-native-powershell/

View Article

Image may be NSFW.
Clik here to view.

Review UPN or User Principal Names

Prior to activating (or on-boarding) users into Office 365, you need to make sure that your UPN’s are correct in AD (if you are using DirSync). I used this command to export account details for all...

View Article


Image may be NSFW.
Clik here to view.

Compare Contents of 2 Files

This is a great little script. If you have 2 files, each with a list of items (for example server names), this script will compare both files and tell you: Which items exist in both lists (=). Which...

View Article


Image may be NSFW.
Clik here to view.

Find Duplicate Mailboxes

Here’s how you find any duplicate mailboxes in an Exchange environment: $mailboxes=Get-Mailbox -resultsize unlimited $mailboxes| group name |sort count -descending All duplicate mailboxes will appear...

View Article

Image may be NSFW.
Clik here to view.

Export List of AD Sites and Subnets

This is a cute little powershell script that will export a list of all AD Site Names and associated Subnets. It will create multiple lines where multiple Subnets exist… ADSites.ps1 [cmdletbinding()]...

View Article
Browsing all 11 articles
Browse latest View live




Latest Images