So you want to edit your input data using PowerShell

In one of my previous blog posts, I had a CSV worth of content in which I wanted to change a specific field of data.

I was racking my brain on how I could best approach this and while working on this, I kept getting a better and cleaner result, but every step approached the issue a bit different, even though the output was as required.

Requirements

I have a CSV file which contains the following headers

Going on a Get-Date…part 2

As mentioned previously in my first part of this Get-Date series, I had run into some issues that were seemingly easy to resolve, yet proved to be a bit more hassle than expected.

Funny enough, the second issue where I ran into date issues was just a day or so apart from the first, so I thought I’d resolve my issues with the knowledge I had obtained previously.

The Problem

I had received an Excel sheet which contained various information, one column being Warranty dates. Now the issue was that the Excel sheet was generated on a system which had NL-NL Culture configuration, while my machine is running on EN-US configuration.

Script Dumpster: Reporting all files on ESX Datastores

The Problem

I had a customer who was complaining that the simple overview of disks used by VM’s didn’t add up to the amount of data in use on datastores. Simple reasoning being swap files, snapshots etc. etc. , but the customer wanted to see exactly what was causing this…

In comes PowerCLI [VMWare’s adaption of PowerShell for their solutions]

The Script

Edit: As I had thought at first instance, the datacenter name was working just fine on my 2 test environments, but in a 3rd I quickly ran into an error.

Going on a Get-Date…part 1

Simple issues, simple solutions?

Recently I’ve been doing quite some break-fix cases, which didn’t quite make blogging a high priority.

It did on occasion provide me with nice little gems that I decided to spend a little personal time on, because I thought it would be better to force myself to use PowerShell instead of resolving things manually or through a GUI. Also, I thought these issues would be “simple, quick solutions”, which turned out to be a bit too optimistic.

The case of the disappearing e-mail…

One of my customers was running into an odd case of disappearing e-mails. They have an on-premise Exchange 2010 mail server on which they have a Shared mailbox to which all employees have access.

Now all of a sudden mails that are moved/copied TO this shared mailbox mysteriously disappear…

First thing that came to mind: Rules!

Bring in the Shell

First of all I needed to check if there weren’t any Server side rules which were configured, which you can easily do with the following command:

Scheduled Tasks - PowerShell Scripts with Parameters

Perhaps a very “simple” issue, but I noticed that when looking for this it took me longer than expected to find the result I had in mind.

The issue at hand

I  have a script which requires various parameters to be provided so that I can run it. When running the command through an active console session it would look like this: