Latest Posts
  • Power Tips: Reading Recently Installed Software

    The MSI installer logs all successful software installation to the Windows event log system. Here is a one-liner that can read back that information:

    Get-WinEvent -FilterHashtable @{ ProviderName="MSIInstaller"; ID=1033 } |
    Select-Object -Property * 
    


    Twitter This Tip! ReTweet this Tip!

  • Power Tips: Gathering Forensic Process Info

    In order to better understand the processes that run on a server, and possibly identify traces of unwanted processes, PowerShell can dump forensic process information to CSV file in a way that Excel (if installed) can open the file. This way it is easy to review the processes and their command lines…

  • Power Tips: Don’t forget [Math]

    <!doctype html>

    [Math] is a handy static .NET library that you can use inside PowerShell whenever you need more advanced math functions:

     
    PS> [Math] | Get-Member -Static
    
    
       TypeName: System.Math
    
    Name            MemberType Definition
    ----            ---------- ----------
    Abs             Method…
  • Power Tips: Trusting All SSL Sites

    When PowerShell cmdlets download data via HTTPS:, they check whether the server certificate is valid, and if it is not, you receive an exception:

    # this URL always produces an SSL error:
    $url = 'https://expired.badssl.com/'
    
    # fails
    $result = Invoke-RestMethod -Uri $url -UseBasicParsing  
    

    In…

  • Power Tips: Logging Variable Types

    As part of your debugging and quality control you may want to log the data that gets assigned to individual variables. For example, you may want to find out what the actual data types are that are assigned to a given variable, so that you could later strongly-type the variable for added security.

    Here…

  • Power Tips: Converting Language IDs in Language Names

    In our previous mini series we showed different approaches to get to the names of installed OS languages using different PowerShell methods. The result was always a list of language IDs, similar to this one:

     
    de-DE
    en-US
    fr-FR   
     

    What if I needed to convert these to full country names? Fortunately…

  • Power Tips: Determining Language Packs (Part 3)

    In part 2 of this series, you already witnessed how much easier and faster it was to query the list of installed operating system languages using WMI compared to using command line tools like dism.exe. However, WMI still requires you to know the appropriate WMI class name.

    That’s why PowerShell sports…

  • Power Tips: Determining Language Packs (Part 2)

    In part 2 of this series, we’d like to solve our puzzle – getting installed language packs – by using the built-in PowerShell features. In part 1 we used a console application (dism.exe) which worked but was complex and required Administrator privileges.

    An object-oriented approach…

  • Power Tips: Determining Language Packs (Part 1)

    Let’s assume you need to find the installed language packs for a Windows machine. In this three-part series, we use PowerShell’s features to tackle this problem.

    In part 1, we simply try and solve the issue by looking for a native non-PowerShell command that we could utilize.

    As it turns…

  • Power Tips: Creating World Map Graphs

    If you have data related to countries, you may want to visualize and highlight this geographic data. Classic bar- and chart-graphs won’t always work here.

    Fortunately, there are free online geographic charts available that PowerShell can use. Here is a function you can try:

    function Show-MapGr…