Tim D'Annecy

Powershell

#PowerShell

A client I've been working with needed a way to check the warranty status of thousands of Lenovo laptops they own. The end goal was to import the warranty expiration dates into Freshservice so they can estimate device lifecycles and find out which users needed laptop replacements.

Right now, Lenovo doesn't offer an API that could do this and I would need to look up each laptop one-by-one.

To solve this problem and avoid manual lookups, I wrote a short PowerShell script that takes the serial number, scrapes Lenovo's warranty check page and gets the warranty information for the device, then outputs to a PowerShell object with the regular and upgrade warranty statuses and the end dates.

In my use case, I exported all devices from Intune into a .csv file, filtered on all Lenovo devices, then ran the Get-LenovoWarrantyInformation script against all of them in a for loop. I exported to a clean .csv file that I could then upload into the Freshservice inventory.

Read more...

#PowerShell #Windows

Recently, I upgraded my home network to 10gbps switches and routers. I purchased a 10gbps Thunderbolt 3 adapter with ethernet from Amazon for my PC that only had 2.5gbps ethernet. After it arrived, I plugged it in and it worked great with a full 10/10gbps connection.

After a reboot, however, my PC running Windows 11 wasn't able to see it anymore in Network Connections and it wasn't connecting to my network.

This post has a PowerShell script to fix the issue and a brief explanation of where the setting might be coming from.

Read more...

#Orchestry #Teams #PowerShell

My company recently performed a domain name change in SharePoint and Entra ID/Azure AD. Among other things, this migration required us to re-install and re-deploy Orchestry from scratch.

After re-installation, some sites did not have the correct “Team Information” tab listed in the General channel. “Team Information” is a critical tab that is installed/added to a Team when the Team is provisioned through the regular Orchestry workflow. Without the tab, regular users can't request or add new Guests to the Team, which is a huge headache if your tenant is configured for Orchestry governance and have dis-allowed any Guest additions, aside from admins. The tab appears like this:

Screenshot of a Teams team, General channel, on the "Team Information" tab from Orchestry

In the case of our migration, this tab wasn't showing the correct information and wouldn't load on all sites that were created with Orchestry. This tab was also missing on all other Teams that weren't provisioned using Orchestry.

To fix this issue, I wrote a PowerShell script that adds the tab to the General channel on all Teams in bulk.

Read more...

#Exchange #PowerShell

I received a request from a client that was struggling with using Shared Mailboxes in Exchange Online. They wanted to be able to see all sent email messages in the Shared Mailbox “Sent” folder instead of the user's email address.

For example:

  1. A user has “Send As” permissions on a Shared Mailbox named “Finance@example.com”.
  2. The user composes a new email in Outlook and changes the “From” setting to “Finance@” and clicks the Send button.
  3. The email is delivered to recipients from “Finance@”.
  4. A copy of the sent email is stored in the user's “Sent” folder.

The issue with this process is that there is no record inside the Shared Mailbox that an email was sent from the account. Only the original sender has a copy of the message, but other users who have access to the Shared Mailbox cannot see which email messages have been sent out or which items in the inbox have been replied to.

To fix this issue, I wrote a quick PowerShell script to update all Shared Mailboxes with 2 attributes.

Read more...

#Azure #PowerShell

After setting up a new Azure Subscription, you'll get errors in the Portal that say Resource Providers are enabled for Azure Services:

Resource provider 'Microsoft.BotService' not registered for the subscription

You might also get the following error message:

(Code: NoRegisteredProviderFound)

To fix these errors, you will need to enable the Resource Providers in Azure so that you can allow management from the Portal.

You can enable these Resource Providers one-by-one manually through the portal by navigating to the Subscription > Resource Providers and clicking the “Register” button, but this can take a long time if you want to enable all Resource Providers.

To add them quickly, you can run a one-line PowerShell command to enable all that are currently disabled.

Read more...

#PowerShell #Outlook #Windows

I have multiple email accounts that I juggle to support other client tenants, but I keep one primary calendar in Outlook with my work account. Every morning, I go through my other account emails and manually copy over events into my primary calendar so that I don't get double booked. I'm sure there's a better way to manage my calendars, but this has been working for me so far.

This morning, however, I tried to copy a meeting from my alternate account into my primary calendar, but I got the following popup message:

Screenshot of Outlook error message

Microsoft Outlook: Copying meetings is not supported.

I'm running Outlook with a Microsoft 365 Apps for Enterprise license, version 2312 (Build 17126.20126 Click-to-Run) on the Current Channel. I'm running Windows 11 Business with a Windows 11 Enterprise subscription, Version 23H2, OS Build 22631.2861, with Windows Feature Experience Pack 1000.22681.1000.0

To fix this issue in Outlook and to be able to copy calendar entries across accounts, I needed to make a change in the Registry.

To make it easier and to give others the ability to deploy this org-wide, I wrote up a quick PowerShell script that changes the value.

Read more...

#PowerShell #Exchange #M365

Similar to my post yesterday to get all SharePoint Sites for a user, I received another request today to generate a report of all Shared Mailboxes that a user has access to in Exchange Online.

Right now, there's no ability in the Exchange Admin center to list all Shared Mailboxes that a user can access.

To work around this limitation, I wrote a simple PowerShell script to get all Shared Mailboxes, check if the specified user has permissions, then output the report to a .csv file.

Read more...

#SharePoint #PowerShell #ShareGate #M365

Today, I received a request to generate a report of all SharePoint Sites that a user has access to. Currently, the SharePoint admin center portal only has the ability to see which users are members of a group. There's no ability for the inverse: Which Sites does a user have access to?

To do this, I wrote a quick PowerShell script to iterate through all sites, checks if the user is a Member, then outputs the list of sites to a .csv.

Read more...

#Powershell #Azure #Teams

A company I'm working with is located in multiple countries and has added Multi-Geo licenses for Microsoft 365. Recently, we rolled out Orchestry to streamline requests and approvals for creating new Teams on behalf of staff.

Currently, one of the shortcomings of Orchestry is the lack of support for Microsoft's multi-geo capabilities. If you have a tenant spanning more than one location, you will need to manually move Teams that were provisioned in Orchestry after they've been created. The lack of multi-geo support is not great—a SharePoint Administrator is required to run PowerShell commands to manually move the site to bring it under compliance with any GDPR or other data governance requirements.

This post will detail the steps for a workflow that allows you to provision Teams in Orchestry and have them automatically moved to the correct location using a webhook and an Azure Automation Runbook.

Read more...

#Intune #PowerShell

A company I work with is using BioEdit, an old application that's used for DNA sequencing. They recently moved to Intune management for all of their devices and needed this app packaged up for deployment to all of their Windows devices.

I couldn't find any information about this app for deployment or installation, so I had to figure it out on the fly. I wrote this guide for anyone needing to deploy this app in Intune.

Read more...