<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tools and Scripts on justinverstijnen.nl</title><link>https://projectkaasplank.justinverstijnen.nl/tags/tools-and-scripts/</link><description>Recent content in Tools and Scripts on justinverstijnen.nl</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sun, 12 Apr 2026 17:09:27 +0200</lastBuildDate><atom:link href="https://projectkaasplank.justinverstijnen.nl/tags/tools-and-scripts/index.xml" rel="self" type="application/rss+xml"/><item><title>Remove Microsoft Print to PDF and OneNote printers script</title><link>https://projectkaasplank.justinverstijnen.nl/remove-microsoft-print-to-pdf-and-onenote-printers-script/</link><pubDate>Mon, 29 Dec 2025 00:00:00 +0000</pubDate><guid>https://projectkaasplank.justinverstijnen.nl/remove-microsoft-print-to-pdf-and-onenote-printers-script/</guid><description>&lt;p&gt;In this guide, I will show you how to delete the printers using a PowerShell script. This is compatible with Microsoft Intune and Group Policy and can be used on physical devices, Azure Virtual Desktop and Windows 365.&lt;/p&gt;
&lt;p&gt;By default in Windows 11 with Microsoft 365 apps installed, we have two software printers installed. These are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;OneNote (Desktop)&lt;/li&gt;
&lt;li&gt;Microsoft Print to PDF&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src="https://sajvwebsiteblobstorage.blob.core.windows.net/blog/remove-microsoft-print-to-pdf-and-onenote-printers-script-4319/jv-media-4319-5e8079ca2ffa.png" alt=""&gt;&lt;/p&gt;
&lt;p&gt;However, some users don&amp;rsquo;t use them and they will annoyingly be as default printer sometimes, which we want to avoid. Most software have built-in options to save to PDF, so this is a bit redundant. Our real printers will be further down which causes their own problems for end users.&lt;/p&gt;</description></item><item><title>Windows Server Inventory Report Script</title><link>https://projectkaasplank.justinverstijnen.nl/windows-server-inventory-report-script/</link><pubDate>Thu, 13 Nov 2025 00:00:00 +0000</pubDate><guid>https://projectkaasplank.justinverstijnen.nl/windows-server-inventory-report-script/</guid><description>&lt;p&gt;To help us IT identifying certain configurations on a server and possible misconfigurations I have made a PowerShell script which creates a complete overview of the current server configuration and exports it as a single HTML file.&lt;/p&gt;
&lt;p&gt;In this post I will explain how to use it and how the script works.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://sajvwebsiteblobstorage.blob.core.windows.net/blog/windows-server-inventory-report-script-3866/jv-media-3866-047721edba6f.png" alt=""&gt;&lt;/p&gt;
&lt;p&gt;An example of the output of the script.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="where-to-download-this-script"&gt;Where to download this script?&lt;a class="td-heading-self-link" href="#where-to-download-this-script" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;For the fast pass, my script can be downloaded here:&lt;/p&gt;</description></item><item><title>Clean files on a schedule with Powershell script</title><link>https://projectkaasplank.justinverstijnen.nl/clean-files-on-schedule-with-powershell-retention-script/</link><pubDate>Thu, 18 Sep 2025 00:00:00 +0000</pubDate><guid>https://projectkaasplank.justinverstijnen.nl/clean-files-on-schedule-with-powershell-retention-script/</guid><description>&lt;p&gt;Sometimes in IT, we have software or solutions that need to to save temporary files in your filesystem. Let&amp;rsquo;s say, a feed with logs or CSV files that are saved, logs or back-ups like the Bartender software. The software itself doesn&amp;rsquo;t have a solution to clean up those files and after 2 years, the size can be massive.&lt;/p&gt;
&lt;p&gt;To let this files clean on schedule I have created a Powershell script which cleans those files in specific folders after they are not modified in *specfied* days . You can define the folders and number of days at the parameters section of the script.&lt;/p&gt;</description></item><item><title>Initial Installation script for Windows Azure VMs</title><link>https://projectkaasplank.justinverstijnen.nl/initial-installation-script-for-windows-azure-vms/</link><pubDate>Sun, 10 Aug 2025 00:00:00 +0000</pubDate><guid>https://projectkaasplank.justinverstijnen.nl/initial-installation-script-for-windows-azure-vms/</guid><description>&lt;p&gt;When deploying Windows VMs in Azure, we get the default settings. This means we get a 12-hour clock, standard UTC/Zulu timezone and such. For users like us in the Netherlands we want to change this but not by hand.&lt;/p&gt;
&lt;p&gt;For this purpose I built this script. It sets the timezone for Western Europe and sets the clock to 24-hour system. It also does some bonusses like responding to ping and disabling the IE Enhanced Security as it&amp;rsquo;s mostly server focussed. We don&amp;rsquo;t change the Windows language and this stays English.&lt;/p&gt;</description></item><item><title>Clean up old FSLogix profiles with Logic Apps</title><link>https://projectkaasplank.justinverstijnen.nl/clean-up-your-fslogix-profiles-with-logic-apps/</link><pubDate>Thu, 07 Aug 2025 00:00:00 +0000</pubDate><guid>https://projectkaasplank.justinverstijnen.nl/clean-up-your-fslogix-profiles-with-logic-apps/</guid><description>&lt;p&gt;Today I have a Logic App for you to clean up orphaned FSLogix profiles with Logic Apps. As you know, storage in Azure costs money and we want to store as minimum as possible. But in most companies, old and orphaned FSLogix profiles will be forgotten to clean up so we have automate this.&lt;/p&gt;
&lt;p&gt;In this guide I will show you how you can clean up FSLogix profiles from Azure Files by looking up the last modified date, and deleting the files after they exceeded the number of days.&lt;/p&gt;</description></item><item><title>Installing Windows Updates through PowerShell (script)</title><link>https://projectkaasplank.justinverstijnen.nl/installing-windows-updates-through-powershell-script/</link><pubDate>Sun, 27 Jul 2025 00:00:00 +0000</pubDate><guid>https://projectkaasplank.justinverstijnen.nl/installing-windows-updates-through-powershell-script/</guid><description>&lt;p&gt;Sometimes we want to install updates by hand because of the need for fast patching. But logging into every server and installing them manually is a hell of a task and takes a lot of time.&lt;/p&gt;
&lt;p&gt;I have made a very simple script to install Windows Updates by hand using PowerShell including logging to exactly know which updates there were installed for monitoring later on.&lt;/p&gt;
&lt;p&gt;The good part about this script/PowerShell module is that it does support both Windows Client and Windows Server installations.&lt;/p&gt;</description></item><item><title>Audit your Entra ID user role assignments</title><link>https://projectkaasplank.justinverstijnen.nl/audit-your-entra-id-user-role-assignments/</link><pubDate>Tue, 01 Jul 2025 00:00:00 +0000</pubDate><guid>https://projectkaasplank.justinverstijnen.nl/audit-your-entra-id-user-role-assignments/</guid><description>&lt;p&gt;Today I have a relatively short blog post. I have created a script that exports all Entra ID user role assignments with Microsoft Graph. This can come in handy when auditing your users, but then realizing the portals doesn&amp;rsquo;t always show you the information in the most efficient way.&lt;/p&gt;
&lt;p&gt;Therefore, I have created a script that only gets all Entra ID role assignments to users of every role and exports it to a nice and readable CSV file.&lt;/p&gt;</description></item><item><title>Disk cleaning script on Windows Azure VMs</title><link>https://projectkaasplank.justinverstijnen.nl/disk-cleaning-script-on-windows-azure-vms/</link><pubDate>Sat, 28 Jun 2025 00:00:00 +0000</pubDate><guid>https://projectkaasplank.justinverstijnen.nl/disk-cleaning-script-on-windows-azure-vms/</guid><description>&lt;p&gt;On Windows Servers, a critical point is maintaining the disk space. If a disk fills up to the end, several errors can occur and impacting the end-users experience of your applications. Something we definitely not want.&lt;/p&gt;
&lt;p&gt;To help reducing this chance, I have created a PowerShell script that cleans up your server using built in tools of Windows. In this post, I will explain what the script does, how to install it and how to use it.&lt;/p&gt;</description></item><item><title>Audit your privileged Entra ID applications</title><link>https://projectkaasplank.justinverstijnen.nl/audit-your-privileged-entra-id-applications/</link><pubDate>Wed, 25 Jun 2025 00:00:00 +0000</pubDate><guid>https://projectkaasplank.justinverstijnen.nl/audit-your-privileged-entra-id-applications/</guid><description>&lt;p&gt;In Microsoft Entra ID it&amp;rsquo;s possible to create App registrations and Enterprise applications who can get high privileges if not managed and monitored regularly. We do our best with Identities to be secure, with security processes like MFA, access reviews and such, but most of the companies don&amp;rsquo;t care that much about the Enterprise applications.&lt;/p&gt;
&lt;p&gt;In this post, I will try to convince you that this is as much as important as identities. For helping you to solve this I built a PowerShell script to get a complete overview of all the applications and their permissions.&lt;/p&gt;</description></item><item><title>Test Azure Virtual Desktop connectivity and RTT</title><link>https://projectkaasplank.justinverstijnen.nl/azure-virtual-desktop-connectivity-script/</link><pubDate>Thu, 22 May 2025 00:00:00 +0000</pubDate><guid>https://projectkaasplank.justinverstijnen.nl/azure-virtual-desktop-connectivity-script/</guid><description>&lt;p&gt;Sometimes, we need to check some basic connectivity from end user devices to a service like Azure Virtual Desktop. Most networks have a custom firewall equipped where we must allow certain traffic to flow to the internet.&lt;/p&gt;
&lt;p&gt;Previously there was a tool from Microsoft available, the Azure Virtual Desktop experience estimator, but they have discontinued that. This tested the Round Trip Time (RTT) to a specific Azure region and is a calculation of what the end user will get.&lt;/p&gt;</description></item><item><title>Windows Search optimization on Azure Virtual Desktop</title><link>https://projectkaasplank.justinverstijnen.nl/windows-search-optimization-azure-virtual-desktop/</link><pubDate>Thu, 15 May 2025 00:00:00 +0000</pubDate><guid>https://projectkaasplank.justinverstijnen.nl/windows-search-optimization-azure-virtual-desktop/</guid><description>&lt;p&gt;When using Windows 11 Multi Session images on Azure for Azure Virtual Desktop, Microsoft has disabled some features and changed the behaviour to optimize it for using with multiple users. One of the things that has been &amp;ldquo;lazy loading&amp;rdquo; is Windows Search. The first time after logging in it will be much slower than normal. The 2nd, 3rd and 4th time, it will be much faster.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://sajvwebsiteblobstorage.blob.core.windows.net/blog/windows-search-optimization-azure-virtual-desktop-3737/jv-media-3737-445bd67fa9ae.mp4"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In this video you will see that it takes around 5 seconds till I can begin searching for applications and Windows didnt respond to the first click. This is on a empty session host, so in practice this is much slower.&lt;/p&gt;</description></item><item><title>Create AD users with on demand script</title><link>https://projectkaasplank.justinverstijnen.nl/create-ad-users-with-on-demand-script/</link><pubDate>Fri, 27 Dec 2024 00:00:00 +0000</pubDate><guid>https://projectkaasplank.justinverstijnen.nl/create-ad-users-with-on-demand-script/</guid><description>&lt;p&gt;Today I have a PowerShell script that creates users by asking the user what to fill in. This works by having a fully prepared &amp;ldquo;New-ADUser&amp;rdquo; command with all the properties filled in to have all users using the same attributes.&lt;/p&gt;
&lt;p&gt;I will explain how this script works on this page.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="the-create-ad-users-on-demand-script"&gt;The create AD users on demand script&lt;a class="td-heading-self-link" href="#the-create-ad-users-on-demand-script" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;For the fast pass, the script can be downloaded from my GitHub page:&lt;/p&gt;</description></item><item><title>How to Export Active Directory (AD) users fast and easy</title><link>https://projectkaasplank.justinverstijnen.nl/how-to-export-active-directory-ad-users-fast-and-easy/</link><pubDate>Thu, 14 Nov 2024 00:00:00 +0000</pubDate><guid>https://projectkaasplank.justinverstijnen.nl/how-to-export-active-directory-ad-users-fast-and-easy/</guid><description>&lt;p&gt;Sometimes we need to export all of our AD users. The one time for applying changes, sometimes for monitoring the inventory but often for licensing purposes.&lt;/p&gt;
&lt;p&gt;At this page I will show you how to export all your AD users fast and easy.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="the-export-ad-users-script"&gt;The Export AD users script:&lt;a class="td-heading-self-link" href="#the-export-ad-users-script" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;For the fast pass, I uploaded the script to my Github page:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/JustinVerstijnen/JV-ExportADUsers"&gt;Download script from GitHub&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="how-to-export-the-ad-users-by-hand"&gt;How to export the AD users by hand&lt;a class="td-heading-self-link" href="#how-to-export-the-ad-users-by-hand" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To export the users without using a script, navigate to your Active Directory management server and open up Powershell. We will do all the action the script above does, but then by hand and type in every command separately.&lt;/p&gt;</description></item><item><title>Set correct language and timezone on Azure VM</title><link>https://projectkaasplank.justinverstijnen.nl/set-correct-language-and-timezone-on-azure-vm/</link><pubDate>Thu, 10 Oct 2024 00:00:00 +0000</pubDate><guid>https://projectkaasplank.justinverstijnen.nl/set-correct-language-and-timezone-on-azure-vm/</guid><description>&lt;p&gt;By default, all Azure VMs are set to English language and UTC/Zulu timezone. This will work for a great portion of the Azure VM users but there are users in other parts of the world too. Like in the Netherlands, where I live we are 1 or 2 hours ahead of that timezone depending on the season.&lt;/p&gt;
&lt;p&gt;Also, in the case of Azure Virtual Desktop, we want to present our users their native language as system language. For this case, I have made a script to correct those settings.&lt;/p&gt;</description></item><item><title>Get Windows Product Key with PowerShell</title><link>https://projectkaasplank.justinverstijnen.nl/get-windows-product-key-with-powershell/</link><pubDate>Sun, 28 Jul 2024 00:00:00 +0000</pubDate><guid>https://projectkaasplank.justinverstijnen.nl/get-windows-product-key-with-powershell/</guid><description>&lt;p&gt;Sometimes we need to have the original installed Windows Product Key just for documentation purposes. We simple can do this with one command in PowerShell:&lt;/p&gt;
&lt;p&gt;
 &lt;div class="td-card card border me-4"&gt;
&lt;div class="card-header code"&gt;
 &lt;strong&gt;POWERSHELL&lt;/strong&gt;
 &lt;/div&gt;
&lt;div class="card-body code p-0 m-0"&gt;
 &lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Get-ItemProperty&lt;/span&gt; &lt;span class="n"&gt;-Path&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;BackupProductKeyDefault&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
 &lt;/div&gt;

&lt;img src="https://sajvwebsiteblobstorage.blob.core.windows.net/blog/get-windows-product-key-with-powershell-3681/jv-media-3681-3a0bbc0e5409.png" alt=""&gt;&lt;/p&gt;
&lt;p&gt;Please note that I am not encouraging software abuse or pirating, just sharing a tip to make our IT life a bit easier. It happens that a server or computer gets installed and we forget to document the product key or just to match it with our known information.&lt;/p&gt;</description></item></channel></rss>