Tag: PowerShell
-
PowerShell wrapper for creating a new distribution group
Unknown to me, in Exchange 2010 when you create a new distribution group in EMC, by default, the group will not receive email from external recipients – the setting “Require that senders are authenticated” is checked. We use distribution groups to communicate with clients, so unauthenticated senders need to email these groups. This setting is…
-
PowerShell wrapper scripts for Exchange 2010 – first step: make a connection
As I talked about in this previous post, I like to write wrapper scripts that collect input and pass it along to the actual provided functions. I call these wrapper scripts because they are not really doing anything ground breaking, they are just a series of conditionals and commands that I put together, with a…
-
PowerShell script to email users if password expires soon, and send a summary to IT
I wanted to expand on my previous script: powershell-to-list-all-users-and-when-their-password-expires, so that it would send the user an email if their password was going to expire soon. Additionally I wanted to send a summary to our IT staff of accounts that were going to expire soon. Here is that script:
-
PowerShell Active Directory wrapper scripts.
In my PowerShell profile I have a routine the sources all the *.ps1 files in a folder. One of these .ps1 files contains Active Directory “wrapper” functions. I call them “wrapper” functions because they simplify the parameters needed to return data in a format we want. The idea is that I can write a series…
-
PowerShell script to silently install RSAT 2008 R2 SP1
I often re-image my machine – that way I know my SCCM OSD is working properly and has the most recent “secondary apps” (Reader,Flash,FireFox . . .). Because I am always re-imaging, I like to automate installing the software I always need like Remote Server Administration Tools – RSAT. I wanted a function to install…
-
PowerShell to set ACLs that prevent renaming of top-level directories in a share
We have a shared folder that is replicated to all our sites using the fantastic GlobalScape WAFS (@GlobalScape). This folder is huge. People go into the folder, and “type ahead” to get the subfolder they want, but what keeps happening (and I am sure you have seen this) is that when users click and try…
-
PowerShell, Event Triggers, MailboxMoves and email notification
We are in the process of moving our Mailboxes from Exchange 2003 to Exchange 2010. I am using this script to automate the moves. I wanted to find a way to get an email notification when the move is complete. I figured I could keep the PowerShell script running in a “while loop” until Get-MailBoxMoveStatistics reports “Completed”,…
-
PowerShell to assign Exchange 2010 Retention Policies based on AD group membership
In exchange 2003 we maintained a 6 month and 12 month purge policy that was applied based on group membership. I described that configuration here. I wanted to migrate our purge policies to the new 2010 Recipient policies. I needed to find the members of an AD group and assign a retention policy to their mailbox. Here is…
-
Scheduled PowerShell script to resume Mailbox Moves (New-MoveRequest)
Moving mailboxes from 2003 to 2010 is easy, but there is not a “Gui” to schedule it. So I created the following PowerShell script to find all the suspended MoveRequest(s) with the correct date, and resume them. MailboxMove.ps1: Next I create a scheduled task with the following command to run a script with the code…
-
PowerShell Function to get uptime on multiple computers
I wanted to create a function that I could use to find the uptime of several workstations. I did not want to read a list of machine name from csv, I just wanted pass a list of workstation names and get their uptime back. I also added a ping check to make sure the machine…
