Report Scheduled Tasks on servers that have local or domain accounts configured

For one of our customers, I needed to create a report of all Scheduled Tasks on their servers with a local or domain account configured. They needed this report because they are switching to more strict Group Policies and they needed to know what user accounts should have the "Log on as a batch job" … Continue reading Report Scheduled Tasks on servers that have local or domain accounts configured

Using Send-MgUserMail as the Send-MailMessage replacement

I used the Send-MailMessage cmdlet a lot in the past for testing Receive Connectors in Exchange or for emailing reports in scheduled PowerShell scripts. When you try to use the Send-MailMessage cmdlet, it has been showing you this message for quite a while now: WARNING: The command 'Send-MailMessage' is obsolete. This cmdlet does not guarantee secure connections to SMTP servers. While there is no immediate replacement available in PowerShell, we recommend you do not use Send-MailMessage at this time. See https://aka.ms/SendMailMessage for more information. In this blog post, I will show you the new way of sending emails using Send-MgUserMail. Note: This works for Exchange Online, not for local Exchange installations or any other service running SMTP.

Create a report on local DNS lookups using PowerShell

When troubleshooting a system, you sometimes need to know what DNS lookups are being done. This will give you a good insight into traffic from the systems to the local network or internet. You can do this with DNS auditing on your Windows server or in your local Pihole server, but that's not always available … Continue reading Create a report on local DNS lookups using PowerShell

Deploy a Hyper-V VM and register it for Autopilot automatically using PowerShell

For Endpoint Manager testing I need a VM connected to the tenant of the customer. This involves deploying a Windows 10 or 11 VM, changing hardware settings on it (Secure Boot/TPM/Checkpoint settings), and registering it for Autopilot. This blog post will show you how to automate the process as much as possible.

Report on Active Directory Container permissions using PowerShell

In a previous blog post (Link), I showed a way to create a report on OU (Organizational Unit) permissions. One of the replies I got about that was: How about the Container permissions, those are important too 🙂 And that's correct, they are! In this blog post, I will show you how to create a report on those (Script is based on the OU report)

Compact Hyper-V VHDX files using PowerShell

I used VMware Workstation for a while which has an option to automatically compact the virtual hard disk after shutting down the VM, an excellent way of freeing up space on my laptop hard drive. But I switched to using only Hyper-V now, compacting virtual hard disks is not something you can enable in Hyper-V to run automatically. In this blog post, I will show you how to do this using a script that you can use to do that in an easy way 🙂

Create a focus time countdown clock using PowerShell

Sometimes you really need to finish something and notifications from your running programs keep taking away your focus... You can try using the script in this blog post to keep focused on your task, when the count-down timer is done your programs will be available again. Hope this helps 🙂 Table Of ContentsshowWhat is focus … Continue reading Create a focus time countdown clock using PowerShell

Create a TCP/UDP port listener using PowerShell

One of our customers is securing his network and firewall changes were made that needed to be tested. In this case, the new servers were not deployed in that specific network yet. But... We did want to test the connections before deploying the servers 🙂 In this blog post, I will show you a way how to create listening ports on a machine in order to test the connection from another network using netcat on Linux or portqry on Windows.