Author: jbmurphy
-
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:
-
Quick bash script to change .htpasswd passwords across a server
I wanted to change passwords for a users that is in all of our htpasswds. Here is a quick bash find script to do that: for PATH in $(find / -name .htpasswd); do htpasswd -b $PATH username NewPassword; done
-
Cisco ASA hacking – Getting started
My wife (Team Murphy’s CFO) allowed me to purchase a Cisco ASA 5505 for home. We use ASAs at work, and I am interested in how we can leverage these devices to their fullest. I am new to Cisco and to their IOS (the original IOS). I was impressed, the 5505 was easy to setup,…
-
VMware ESX suspended machine won’t resume because of missing hardware
We recently had some downtime to physically move a rack for our server room expansion. One of the servers we were shutting down was a VMware ESX host. When I tried to resume the machine, I received an error saying “Module DevicePowerOn power on failed. Unable to open the SCSI device . . .” We…
-
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…
