Apply CVE-2020-1350 Workaround to Remote Computer
A patch has been released for the security vulnerability CVE-2020-1350, which has a 10 out of 10 on the CVSS scale and affects all Windows DNS servers from 2003 to 2019. However, since not everyone can patch systems right away, Microsoft has provided a workaround. The workaround restricts the size of DNS response packets, which only requires a restart of...
Quickly Switch Azure Subscriptions with PSNotes
If you are now aware, PSNotes is a PowerShell module I developed that allows you save code snippets, and recall them right in you PowerShell using an alias. One great use for this I have found is for switching between Azure subscriptions. I work in multiple different subscriptions throughout the day. Some are in the same tenant, but some require...
Parse Email Address
You can use this snippet to parse an email address and extract the different components of it. (Tip. It works for UPNs too) New-Object "System.Net.Mail.MailAddress" -ArgumentList $emailAddress
View All Scheduled Tasks in a Single Pane
Get-ScheduledTask | Select-Object * | Out-Gridview Source: Guy Leech
List all Devices in Device Manager
Get-WmiObject Win32_PNPEntity | Sort-Object -Property PNPClass | Format-Table Name, PNPClass, DeviceID, Manufacturer, Status Source: Thorsten E.
A Quick Lesson in Boolean
I often see scripts that are checking for True/False values using an If/Else statement like the one below. While this technically will work for Boolean values, there are situations where this will not work. For example, if you pass the string value of “False” to the statement above it will evaluate as True. This is because the if condition in...
Fast Deploy Microsoft Teams for Education
Recently one of my colleagues came to me with an interesting situation. His wife runs a homeschool co-op. Basically, a group of parents who homeschool their children, with different parents covering different subjects. Due to COVID-19, he needed a quick way to get them setup in Office 365 and Teams. So, I put together a quick upload script to import...
Properly Capitalize a Title Using PowerShell
Being married to someone who majored in English has made me extra conscious of my spelling and capitalization. So, for my blog posts, I’ve written a script to help me ensure my titles are properly capitalized. It is not perfect (i.e. it doesn’t do a dictionary lookup), but it follows the basic APA guidelines. I thought I would share it,...
Remove First Entry in Fixed Array
Here is a quick little trick for removing the first entry in a fixed size array. This can be used when you receive the error message: Exception calling “RemoveAt” with “1” argument(s): “Collection was of a fixed size.” # Remove first entry $array = $array[1..($array.Length-1)]
Search Intune for Devices with Application Installed
This script uses the GraphAPI to check all devices in Intune to see if they have a particular application installed. $Application = "*PuTTY*" $Username = '[email protected]' Function Get-AuthToken { <# .SYNOPSIS This function is used to authenticate with the Graph API REST interface .DESCRIPTION The function authenticate with the Graph API Interface with the tenant name .EXAMPLE Get-AuthToken Authenticates you...