Author: jbmurphy

  • PowerShell wrapper script to send email

    I wanted a standard function that I can call from other scripts to send email. I needed multiple recipients, and default sender and smtp arguments. Here is the script that I came up with.

  • PowerShell script to add users to a group

    In this previous post : PowerShell wrapper for creating a new distribution group, I created a script for creating a new distribution group. I wanted to take that a step further and prompt the SysAdmin to add users. I created a new recursive function called AddToDistributionGroup. In this code, I prompt for a group name, and…

  • VMware Fusion 4 – Did they move vmrun?

    Did they move vmrun in VMware Fusion 4? In version 4, I find it here: “/Applications/VMware Fusion.app/Contents/Library/” But this documentation says that the command should be in “/Library/Application Support/VMware Fusion”, but I found it here”/Applications/VMware\ Fusion.app/Contents/Library/vmrun” I don’t see anything in the release notes. Anyone?  

  • 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:

  • 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…