Ben's Blog

Posts labelled 🏷️ powershell

  1. Formatting PowerShell tables with jQuery and DataTables

    🏷️ powershell

    One of the great things about PowerShell is its ability to easily export objects to HTML, which - with a little CSS - makes it straightforward to create great-looking reports. But static lists of data aren't enough any more, the people demand interactivity.

  2. Creating shortcuts to PowerShell Scripts

    🏷️ powershell, microsoft-windows

    You've probably noticed that when you double-click on a PowerShell script, it is opened for editing rather than being run. This is useful from a security standpoint, and while administrators have no problem opening up the shell and running the script, you've probably made…

  3. Get the last user to power down a VM

    🏷️ vmware-vsphere, powershell

    We can use PowerShell to search through the event logs of a machine object ($virtualMachine in the example below) for events which match a specific pattern - in this case powering off a machine. Once we have the event object, we can access the properties of the first object in…