How to Use Multithreading in Powershell With Custom Modules

in this blog post, I will go through how you can use Start-Threadjob to use multithreading in your PowerShell script. I will show how you can pass your own custom modules into the PowerShell thread jobs created. The reason why I started looking into this functionality is that I have to build a custom module for interacting with the Cisco Meraki APIv1. I am then creating a script that will query all the networks in the Meraki Organisation and then look for all networks with a specific VLAN.

Use Powershell to Find All Mailboxes a User Has Access To

Many tasks you want to accomplish in Exchange Online, either can only be done through Powershell or is ten times easier to accomplish with Powershell. One of those tasks could be that you need to figure out which shared mailboxes a user has access to. Thankfully you can accomplish this task extremely easily with Powershell. The first thing you will need to do is to get all Mailboxes in the tenant.

How to Create an Azure Service Principal for Running Your Powershell Scripts

An Azure Service Principal can be thought of as a service account, which you can use for logging in as an application I a Powershell script for example. The good thing about using a Service Principal is that you can much easier control access rights and passwords(Secrets) for the service principal than you can with a user. So for example let’s say you create a Service Principal for a specific application, now this service principal will only have access to the specific resources you have granted access to.

How to Deploy Azure Automation Runbooks With Souce Control Through Azure Devops

I use Azure Automation for orchestrating alot of my Powershell automation. I use it for both my Azure environment but also my on-premises environment. I find Azure automation to be a great solution for managing and running your automation, instead of having them run on a server with scheduled tasks. One of the best things about running the scripts in Azure Automations is that you have the possibility to upload your scripts to Azure through Source Control, such as Github or Azure DevOps.

How to Remove Email From All Mailboxes With Powershell

In this guide, I will walk through how you can utilize Powershell to remove a specific mail from multiple users’ mailboxes.  Why would this be useful? Well, let’s say that multiple users start to report that they have received a phishing mail or mail containing malware. In this type of situation, it could be extremely useful to have a script that quickly removes the mail from all user’s mailboxes.

How to Disable Automatic Driver Updates on Windows10

Recently I experienced problems with windows update messing up a Lenovo Thinkpad sound driver. I run Windows Update for Business through Intune. After a long period of troubleshooting different driver versions, I found out that Windows Update would install a bad driver on the machine. So I went into the Intune portal, found Windows Update For Business, and disabled Windows drivers. Unfortunately, this didn’t solve the problem  So I figured there are probably a couple of registry keys that need to be set before the machine won’t download drivers through Windows Update.