WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple

Quick Tip - Encoding emojis in a Microsoft Teams message using O365 API

07.13.2020 by William Lam // Leave a Comment

One easy way to integrate with Microsoft Teams is to use an incoming webhook which can be configured on a per-channel basis. While working on creating some new PowerShell functions for the VMware Event Broker Appliance (VEBA), I was stuck trying to figure out how to properly encode an emoji icon into the MessageCard type for sending a message to a teams channel.

After a bit of searching and some trial/error, I finally found that you needed to use the emoji hex code with the following format:

&#x<EMOJI-HEX-CODE>;

I used this site here to find the emoji to hex code translation. In addition, I also found that the emojis will only render when used in either the activityTitle or text property of the MessageCard. I was initially trying use this within the facts property which does not work.

Here is a working PowerShell example on constructing the the MessageCard JSON which utilizes emojis:

$teamsMessage = [PSCustomObject][Ordered]@{
    "@type"      = "MessageCard"
    "@context"   = "http://schema.org/extensions"
    "themeColor" = '0078D7'
    "summary"      = "VMC SDDC Deleted"
    "sections"   = @(
        @{
            "activityTitle" = "&#x1F6A8; **VMC SDDC Deleted** &#x1F6A8;";
            "activitySubtitle" = "In VMC-Customer[0] Organization";
            "activityImage" = "https://blogs.vmware.com/vsphere/files/2019/07/Icon-2019-VMWonAWS-Primary-354-x-256.png"
            "facts" = @(
                @{
                    "name" = "SDDC:";
                    "value" = "M11-SDDC";
                },
                @{
                    "name" = "Date:";
                    "value" = "2020-07-12T11:20:03.364000Z";
                },
                @{
                    "name" = "User:";
                    "value" = "*protected email*";
                }
            );
            "markdown" = $true;
            "text" = "&#x1F629; This is the text field &#x1F629;";
        }
    )
}

$body = $teamsMessage | ConvertTo-Json -Depth 5
Invoke-WebRequest -Uri $teamsWebhookURL  -Method POST -ContentType "application/json" -Body $body | Out-Null

Here is what the rendered Microsoft Teams message will looks like posting to the webhook:

Categories // Uncategorized Tags // Emojis, Microsoft Teams

Dual Intel M.2 Optane 4801x in Supermicro E300-9D

01.14.2019 by William Lam // 11 Comments

For those that have been following along, I have been testing the Supermicro E300-9D (SYS-E300-9D-8CN8TP) kit in my home lab which I have written about here. One of the last things I was looking into was storage expandability with this platform, especially since Supermicro has a PCIe Add-On Card (AOC-SLG3-2M2) which can add two additional M.2 devices supporting 2260 (60mm), 2280 (80mm) & 22110 (110mm) form factors.

At the same time, our friends over at Intel had just given me access to a couple of their pre-release Intel M.2 Optane 4801x devices which were then released right before the holiday last year. For those wondering why Optane is so interesting, especially from a vSAN perspective, check out this blog post here from my good buddy Pete Flecha over in our Storage and Availability Business Unit (SABU).


This was actually perfect timing as I was also interested to see if there were any high performance and supported M.2 devices that could be used for for vSAN Caching and this device would definitely fit the bill! When I had initially received all the components, I was scratching my head as the AOC was too big to fit horizontally in the E300-9D.

[Read more...]

Categories // Home Lab, Uncategorized Tags // E300-9D, Intel Optane, M.2, PCIe, VSAN

1,000th post - The story behind virtuallyGhetto

12.13.2018 by William Lam // 11 Comments


After publishing my previous article, I realized my next blog post (this article) would be number 1,000, which is pretty insane! It has been an amazing 8 years of sharing and engaging with the VMware community and I just want to thank everyone that has supported me over the years.

Although I have a number of technical blog posts in the backlog, I thought I might do something fun and different for post #1,000. One question that I have gotten over the years, especially when talking to customers and partners in-person is, what is the story behind the name of my blog, virtuallyGhetto? I sometimes even get funny looks as customers are introducing me to their colleagues and management team when they mention the name of my blog 🙂

[Read more...]

Categories // Uncategorized Tags // blogging

  • « Previous Page
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • …
  • 69
  • Next Page »

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...