Tag Archives: report

VMware – PowerShell script to get (storage)vmotion history

Even though I’ve always liked VMWare vSphere, I thought the events and informational messages weren’t always as helpful as they could be.

One of the common things I want to know are the vmotions and storage vmotions that have taken place. Luc Dekens has created a great script that shows the (s)vmotions that have taken place including details about them.

Be sure to take a look at his website for the PowerShell / PowerCLI script including a detailed explanation:


Tags: , , , , , , , , ,

Powershell – Get WSUS clients Without Sync Or Report In X Days

One of the tasks of a WSUS administrator is to make sure that WSUS clients are up-to-date. This requires the WSUS clients to report to the WSUS server on a regular basis.

So if clients do not report to the WSUS server, you need to investigate and resolve the issue.

This script will show you which WSUS clients haven’t reported in X days:

Another use case would be if you manage a WSUS infrastructure with an upstream server and multiple downstream servers for each customer. If one or more 3rd parties are responsible for managing the WSUS clients, you could use this script to automatically mail them the clients they’re responsible for that haven’t reported for X days.

Leave a comment

Posted by on February 17, 2013 in Automation, ICT, Microsoft, Powershell, Windows, WSUS


Tags: , , , , , , , ,

PowerShell – Copy monthly reports to customer reporting folder

Currently report files for multiple customers are placed in a source folder monthly. These report files include the customer name and need to be uploaded a for each customer in a subfolder named “Backup Controle” of their own folder.


  1. The customer’s root folder name can differ from the customer name used in the report files.
  2. The folder “Backup Controle” isn’t always located in the same relative location from the root folder


  • The source report files folder contains:
    • Backup Controle – Customer 1 – 12-2012.pdf
    • Backup Controle – Customer 2 – 12-2012.pdf
  • The customer’s root folder’s might be:
    • C:\Customersroot\Cust1
    • C:\Customersroot\Client2
  • The “Backup Controle” folder might be located at:
    • C:\Customersroot\Cust1\folder1\folder2\folder3\temp\folder4\Backup Controle
    • C:\Customersroot\Client2\folder1\folder2\Backup Controle

This action was performed manually at first using the SharePoint web interface to browse to each customer’s folder and upload the report. This is ofcourse not the type of work you want to do. Using the SharePoint WebDAV you can perform this using Explorer and drag and drop, which would make it a bit more bearable.

It would however be even better if it could be automated and that’s just what we did with this script. The script contains a function where you can define for each customer:

  1. Which name filter specifies the customer for the report name. B.e. : “Customer 1” or “Customer 2”
  2. What the name of the folder is for the customer’s root folder. B.e. : “Cust1” or “Client2”

The script will then recursively look inside the customer’s folder for a folder matching the “Backup Controle” folder and will copy the report to it (assuming the report is not already there).

In this example you would call the function like this:

  • Copy-FileMatchingFilterToCustomerFolder “Customer 1” “cust1”
  • Copy-FileMatchingFilterToCustomerFolder “Customer 2” “client2”

Note: It is assumed that there is only one folder named “Backup” Controle in the customer’s folder.

Leave a comment

Posted by on January 7, 2013 in ICT, Learning, Microsoft, Powershell, Windows


Tags: , , , , ,

%d bloggers like this: