Skip to content
Menu
ScriptingNerd
  • Home
  • Quick Tips
  • GitHub
ScriptingNerd

Category: Powershell

PS C:\> Get-BlogPost -ID b5c85e9

How to open a program as your user on another users desktop remotely

Posted on September 19, 2025September 16, 2025 by Patrik

While PSSession has taken over a lot of the psexec uses in the last 10 years many of us still use psexec for specific edge cases, see for example my post about running powershell as SYSTEM user. Today I had another edge case where I needed to start a process as one user on another…

PS C:\> Get-BlogPost -ID 25a049c

Getting nested nuget dependencies using Powershell

Posted on May 23, 2025May 9, 2025 by Patrik

Recently I needed to get a full list of all dependencies for a dotnet project and process the data using Powershell. Using the dotnet command you can get a list of all dependencies. I decided to build a function that wraps this and parses it to custom objects in Powershell. You either run it when…

PS C:\> Get-BlogPost -ID 1ce087b

How to quickly find the path of exe / binary / command files on you computer

Posted on May 9, 2025May 6, 2025 by Patrik

A few days ago I wanted to find where exactly a binary/exe "command" was located on the disk, specifically nuget. I tried checking the path variable but was unable to find anything useful. Turns out that once again Powershell had a quick solution. I thought Get-Command only showed you Powershell cmlets, that's wrong. It works…

PS C:\> Get-BlogPost -ID 7e79f97

Installing all drivers in a driverpack folder using Powershell

Posted on November 8, 2024November 6, 2024 by Patrik

Sometimes you just want to do a "quick n dirty" installation of all the drivers in a driverpack. When doing so Powershell is your best friend. Simply navigate to the folder and run this command Hope it was helpful, happy scripting!

PS C:\> Get-BlogPost -ID e8f4939

Running a Powershell script on your code before a git commit using pre-commit

Posted on November 1, 2024October 30, 2024 by Patrik

If you’re looking to use PowerShell with the open-source framework called pre-commit, this isn’t the right article for you. Instead, I’ll be focusing on Git’s built-in pre-commit functionality without relying on any third-party tools. If that sounds confusing, don’t worry, I’ll explain this later on. I just wanted to clarify this at the beginning so…

PS C:\> Get-BlogPost -ID 6ce0a34

How to invoke a Task Sequence on your machine using Windows Powershell

Posted on September 13, 2024September 10, 2024 by Patrik

For one reason or another you may want to trigger a Task Sequence to run on a machine. Here is a function for Windows Powershell that does just that. It can take a deploymentId or a packageId, both of which you can find in the CM Console. The script needs to run on the machine…

PS C:\> Get-BlogPost -ID fe3523a

Powershell script for getting your Configuration Manager servers

Posted on January 29, 2024September 5, 2024 by Patrik

Something I find very hard to do in practice is keeping documentation up to date, if you don't automate this it simply will not get done. In this post I am sharing a PowerShell function that can be used to get all your Configuration Manager servers and what roles they have, great for building automated…

PS C:\> Get-BlogPost -ID 9ba0e44

Running a Powershell script as the system user

Posted on January 22, 2024September 26, 2025 by Patrik

I want to begin this one with a short warning, system is the highest access you can get in Windows and you can really break things here, keep that in mind and don't do anything stupid. Now with the warning out of the way, why would you want to run something as the system account?…

PS C:\> Get-BlogPost -ID 0fb2729

Powershell counting to $null instead of 1

Posted on April 19, 2022February 2, 2023 by Patrik

There is this weird thing in Powershell that you might have come across if you have ever counted how many objects you have. In some cases Powershell will count 0 $null 2 3… You could say that this is a side effect of how Powershell tries to "magically" simplify stuff. The thing is, it doesn't…

PS C:\> Get-BlogPost -ID 30f16ce

Running ForEach in parallel on Windows Powershell 5 (and older)

Posted on November 27, 2021April 20, 2022 by Patrik

What we are looking at today is something I have seen people ask for time and time again but never seen a good pre-built solution for. I used to have my own "manual" and clunky way of doing this but then when looking for something completely different I just happened to stumble upon this little…

  • 1
  • 2
  • Next
  • Image

    Patrik Johansson
    Developer

    Coming from a background as a Senior System Administrator I am working with a wide flora of enterprise systems.

    Passionate about Powershell and building tools that are easy to use for everyone.

    In my spare time I work on other coding projects as well, mainly Booksonic and Home Assistant integrations

    LinkedIn GitHub Blog

Recent Posts

  • Finding out how many queries your DB handles
  • How to open a program as your user on another users desktop remotely
  • Getting nested nuget dependencies using Powershell
  • A digital Sticky note that is always on top
  • How to quickly find the path of exe / binary / command files on you computer

Archives

  • September 2025
  • May 2025
  • November 2024
  • September 2024
  • January 2024
  • August 2023
  • February 2023
  • April 2022
  • November 2021
  • March 2020
  • December 2019
  • February 2019

Categories

  • Device Management
  • Git
  • Powershell
  • Quick Tips
  • Below are affiliate links, if you click on them and buy something I may earn a small amount of money without any additional cost to you. Any links found here are for products I am using myself and can vouch for.
  • InterServer
    Very cheap SSD/HDD based virtual servers (VPS). Starting at $6/month for 1TB. Use coupon code BOOKSONIC and get the first month for just 1 cent. I have recently started using intersever for personal projects and so far I am very happy with them.
  • Contabo
    Cheap HDD/SSD/NVMe based Virtual servers (VPS)
    I have used Contabo for years both for my private needs as well as to host the booksonic demo server
©2026 ScriptingNerd | Powered by Superb Themes
Advertisement