Posts for: #PowerShell

Create Your Own PowerShell Profile

Being a fan of automation I like to create my own PowerShell profile. It enables me to load various settings that normally take more time.

The PowerShell profile resides in your home directory and if you work in an AD environment with roaming data you’ll have the same profile on every computer. PowerShell profiles are not new and dates back to PowerShell v2.0.

Others people have written about this subject before but I wanted to share my take on it.

Read more →

Why I love dbatools

I’ve been working on the dbatools project for a while now and I felt like telling you why I love this project.

A little background about me, I’m not a full-time programmer. I learned to program with Java years ago and did little personal projects with PHP, C#, and a couple of other languages. I started PowerShell about 7 years ago and thought I was capable of delivering solid code. That all changed with dbatools.

Read more →

Configure SNMP with Powershell

Powershell can do a lot of stuff and with the right libraries, you can do about anything.

I had to configure the SNMP service on a bunch of servers and I wasn’t going to do this by hand for over 80 servers. It uses three parameters for configuring the service.

ServerList

Path to file that contains all the servers. The text file must have only one server per row.

Manager

Read more →

Tracking E-mail on Exchange With Powershell

I had a problem with the delivery of e-mails. The script presented below creates an Excel document with all the e-mails sent from a specific e-mail address with the event. The script takes four arguments:

  1. AddressList
  2. StartDate
  3. EndDate
  4. Output

AddressList

The address list is a mandatory parameter containing the full path to the text file containing the e-mail addresses. The file is formatted as follows:

Email
[email protected]
[email protected]

StartDate

The start date is the date from when the list is generated. The start date is not mandatory. If no parameter is given the standard start date is seven days from the day the script is executed.

Read more →