Pre-load awesome background images for Microsoft Teams Virtual Background using PowerShell

Microsoft Teams officially rolled out Virtual Backgrounds back in March, around the time COVID-19 went crazy in the United States. With COVID-19 came a slew of people working from home, me included.

I spend a considerable chunk of my week on conference calls for work, volunteering, and honesty – just keeping up with friends. After a while, I had to spice up my virtual background with something new. The current implementation of Virtual Backgrounds in Microsoft Teams is limited in user-friendliness to add custom background images.

To add a custom background, you have to save the file to “%AppData%\Microsoft\Teams\Backgrounds\Uploads\” which isn’t bad once you know this. However, getting fresh background images is the problematic part. I love browsing Reddit and finding the beautiful pictures on EarthPorn or SpacePorn subreddits.

I’m a massive fan of automation, so I choose to play around with PowerShell and create a quick script. Luckily, I was able to snag the bulk of my code from u/uspeoples from a comment posted on the PowerShell subreddit.

All you need to do is change lines 2 and 4 to match your preference and run it. The script will automatically throw the images returned from Reddit into the correct directory.

#I also recommend SpacePorn, but any reddits will work.
$subReddit = "EarthPorn"
#You can use hot, new, or top for the filter
$redditFilter = "top"

#Don't change anything below this line
$teamsDirectory = "$env:AppData\Microsoft\Teams\Backgrounds\Uploads\"
$redditData = (invoke-restmethod "$subReddit/$redditFilter/.json")

foreach($data in $redditData){
    Invoke-WebRequest -Uri $data -OutFile ($teamsDirectory + $data.split('/')[-1])

Now, one major caveat when running this, Reddit won’t always have the best pictures; as my girlfriend put it, “They will also get ugly pictures, and it’ll flood their Teams.” With that said, I promised her I would let my readers know that they can navigate to “%AppData%\Microsoft\Teams\Backgrounds\Uploads\” and delete any that they do not like.

Building a Smart Home focused on physical accessibility Part 2 – The Resources!

Just over a week ago, I blogged about the Smart Home I’ve just started to build. The post seems to have been wildly popular among my friends, with them even engaging and giving me suggestions on how I should do things moving forward.

However, individuals affected with a physical disability are at a significant economic disadvantage. Having the target audience with financial difficulties is the crucial flaw in the article that wasn’t addressed. Having a few hundred dollars to spend on Smart Home technology is challenging to come by when facing the financial challenges that someone with a physical disability is likely to experience.

My original approach to this in the article was to approach the Smart Home install by breaking it up into financially digestible chunks that you can afford to implement and spread it out over time. This approach isn’t realistic for people with disabilities in the United States who genuinely live paycheck to paycheck and are penalized by trying to save money. There are mechanisms around it, yes, but they are hard to understand and navigate.

So why not share with the people of at least Indiana a resource that I hope they know exists, but I understand they might not!

Muscular Dystrophy Family Foundation Logo

The Muscular Dystrophy Family Foundation (MDFF) increases the quality of life and independence of people with Muscular Dystrophy, as well as empowers their families, through advocacy, education, and financial resources. You may be asking, ok, how does this help with a Smart Home? Easy, if you have a Muscular Dystrophy and live in the State of Indiana, you can submit an assistance request for devices that will increase the quality of life and independence for you (person affected by Muscular Dystrophy).

I want to challenge anyone who has read this article, if you are affected by Muscular Dystrophy and live in Indiana, with an apparent financial strain. Submit an Assistance Request and see if you can start your journey to a Smart Home to make the house more accessible!

If you are not affected with Muscular Dystrophy, and you think someone who is financially disadvantaged and sees the significant quality of life improvements they will receive. I encourage you to donate to the Muscular Dystrophy Family Foundation!

Now, please note. I am on the Board of Directors for the MDFF, so that I may have some bias in this article. However, I genuinely believe I am being 100% transparent and trying to drive our community to improve their independence!

How to check Exchange Online Distribution List activity over 30, 60, 90+ days?

All growing and/or large organizations will experience this. We have all of these Distribution Lists, but does anyone even use them or know why they were created 5, 10, 15 years ago? I recently ran into this at work, where we are trying to figure out if we can safely delete specific Distribution Lists. They have members, but most of the members have no idea they are a member, or why they would even need the email address.

As always, I start my investigation into how to do something with a quick Google Search. I stumbled upon a bunch of articles specific to Exchange on-premises, and a few items on how to see usage in the last 10 days, but nothing more. The next issue with the ones I did find for Exchange Online was only going to handle 1000 email messages, more than that, and you have to add additional parameters to the command and page through the command multiple times for more than 5000.

I knew many of these lists most likely have infrequent usage, if any at all, so 10 days wasn’t going to cut it. My resolution to this problem? Scheduled tasks, and time!

Before you can run this script, you need to make sure you install the Exchange Online Management PowerShell Module. The module is on the PowerShell Gallery.

The script itself is pretty straightforward. It would be best if you had a secure way to store your passwords that the script will use for authenticating to Office 365. My example script will only work in interactive mode, and you need to dig a bit into storing credentials securely. I would recommend checking out David Lee’s post “Using saved credentials securely in PowerShell scripts” for more information.

Connect-ExchangeOnline -UserPrincipalName

$date = Get-Date

$fullResults = @()
$i = 1
    $trace = Get-MessageTrace -Status expanded -startdate ($date).AddDays(-10) -EndDate ($date) -PageSize 5000 -Page $i| Group-Object recipientaddress | Select-Object name,count
    $fullResults += $trace
} until($null -eq $trace)

$fileName = (Get-Date -Format "yyyy.MM.dd") + "_DLUsage.csv"
$fullResults | Export-Csv "C:\Reports\$fileName" -NoTypeInformation

All you need to do is update the script to use a securely stored credential and set a scheduled task to run at the same time every 10 days. After however long you want to look at historical data, you import to an Excel spreadsheet and compare!

Building a Smart Home focused on physical accessibility

About a year and a half ago, I decided to jump headfirst into Smart Home Technology. I had used some smart home tech previously, but never tried to tie it together harmoniously. I had used the Nest Thermostate for a long time; I even had a Nest Camera pointed out from the front window to keep an eye on packages arriving. Before I dove in fully, I was gifted a Google Home speaker, but didn’t use it for more than streaming music and adjusting the home’s temperature.

After attending an MDFF Expo and hearing about the fantastic things that can be done with Smart Home Technology to improve accessibility, I asked myself, “how am I not already doing this?”

I spent a significant amount of time weighing the pros and cons of both Amazon and Google as the Smart assistant for the house. Eventually landing on the Amazon Alexa, simply because I use Microsoft Office 365 for my work calendar, and at the time, Google didn’t support accessing it.

However, I still needed to decide what functionality in my home I wanted to automate and integrate. My accessibility needs are minor, so most focused on convenience with a small perk of increasing accessibility. I started pretty easy. I decided to focus on the following:

  • Smart lock for front door
  • Smart garage door
  • Smart Doorbell
  • Control my TV’s
  • Smart Lighting
  • Smart Blinds

I still haven’t finished implementing all of these since there is a cost to these, and sometimes it is relatively significant. 

My first task was to implement smart speakers (Amazon Echo’s) throughout the house. Smart Speakers gave me the ability to control the smart devices using my voice. Immediately upon installing them, I connected my Nest Thermostat to control the home’s temperature and connected it to my Xbox in the great room. Now I was able to manage my main TV by using my voice!

After implementing the smart speakers, I started with the front door. I spend a fair amount of time exercising in my chair, and nothing more annoying than having to fight to get up a ramp and unlock a door using keys. However, another huge perk of this is integrating it with Alexa. I would like you to picture this. You have a physical disability and are unable to get out of bed on your own without assistance. You have a PCA who cares for you, but who wants to leave a door unlocked all night, or trust a stranger with a key to their home? By having a smart lock connected to Alexa, you can wake up, still in bed, and use your voice to unlock the front door!

Well, as a technologist, you need to plan for failure. Let’s say your internet is out, Alexa can’t unlock the door. The smart lock I went with also has Bluetooth, so I’m able to unlock the door over Bluetooth with my cell phone.

My next step was to have a smart garage door. Driving to work (Pre COVID-19), I had a bad habit of panicking on my drive to work on if I remembered to close the garage door or not. I also wanted to enter the house through the garage, not just the front door. I landed on the MyQ Smart Garage Door Opener – now I broke one of my rules with this one. It doesn’t directly integrate directly with Alexa; I have to use IFTTT to integrate the two. There are plenty of blog posts out there on this. A simple Google search will find you the answer to do this. By having a smart garage door, the best part was 10 minutes into my drive to the office if I question myself at 6 am – uhh, did I lock the door? I could pull open an app on my phone (while not driving, of course) and see the door’s status.

My next task was to implement a Smart Doorbell using a Ring. Who doesn’t want to look through the peephole of a door to see if it’s a door-to-door salesperson? I know I do, and it is a pain to stand up out of my chair to do it. I had a Nest Camera pointed out a window, but through the window mesh screen, the quality was junk. After installing the Ring doorbell, I was able to get notifications to my phone when someone gets to the door. Still, I’m also able to integrate it with Alexa, and while lying in bed, tell Alexa to show me the front door, and even talk to whoever is there (more on this next.)

The last one I’ve implemented so far is the Fire TV Cube. When I set up the Echo’s throughout the home, I had access to my Xbox, but what about the TV in my room? I have a terrible habit of going to sleep watching TV, and who hates waking up in the middle of the night to find the remote to turn it off? Your disability may impact you to the point that if it isn’t in reach, you can’t change it, adjust the volume or turn the TV off. I set up the Fire TV Cube in the bedroom, and what a world of difference it makes! I can control Netflix, Disney+, Amazon Prime video, my TV channels in general, all using my voice! Being able to manage all of this with your voice is fantastic when you wake up in the middle of the night, realizing the TV is still on and need to mumble “Alexa, TV off,” It happens! An additional perk that came with this is I now could have Alexa answer my front door while lying in bed. I didn’t even need to reach for my cell phone to see who was at my door!

I still haven’t gotten to implementing the smart lights, because I plan on switching out the light switches, and my house has a ton of them! Most of them being 3-way light switches that I don’t want to mess with right now, or the smart blinds; simply because I only want to put those in my office since I recently replaced all but my office blinds with non-smart ones as they were falling apart.

If you would like to get the same equipment I used, please see the links below!

Creating and Managing a Backlog using Microsoft 365 Apps

In the last few months, I’ve spent a lot of time organizing and planning. Most of this time was spent on my personal life organization around the house, but contrary to my most recent blog posts, “Getting things done while working from home using Microsoft To Do!” and “Organizing life, while trapped at home during COVID-19.” I have also put a significant focus on organizing tasks at work. 

I want to walk you through how I’ve created a workflow for incoming requests for training videos using Microsoft Forms, automated notifications using Power Automate, into Microsoft Teams, and automated the tracking inside of Microsoft Planner. All of this accomplished with our existing licensing with an Office 365 E3 license.