Skip to content
Support info to teams
Home ยป Submit support info to Teams channel

Submit support info to Teams channel

For daily support work, most of the same banal information is required from the user, such as username, device name, network information and group memberships. This information can be displayed to the user with a tool, for example. However, devices with longer information such as IP addresses or serial numbers may experience errors. That's why I wrote a script that sends this support information to a defined team channel with one click.

Table of Contents

function / demo

Here is a simple illustration of what the script does and the associated output in Teams:

Flowchart Device Info to Teams
Teams output

Prepare team channel

In order to be able to receive the information in a Teams channel, you must first activate an incoming webhook on it.

You set up the webhook using the three dots in the channel under "connectors" on. In this menu you then select the item "Incoming Webhook"twice"Add" out.

Teams channel, Connectors
add connector
add connector

Once the "Incoming Webhook" is added as a connector, we can configure it. To do this, in the channel again we go to the "connectors". This time we see no more "Add", Then what "Configure" and can dem "Incoming Webhook" give it a name and, if desired, a display picture. The display picture will later appear like a user's when creating conversations.

Teams connectors
Configure Webhook
Configure Webhook, Name and Image

After clicking on "Create" the URL appears, which we will need later in our script.
Copy this out.

Webhook details and URL

customize script

In the script you only have to add the URL of the webhook, then everything is ready.

Webhook URL

Distribute script / function

Theoretically, you could now simply drop the script on a share and the user can then run it with a right click and the option "run with PowerShell". Of course, this is anything but user-friendly.

Simple taskbar tool

To distribute it very simply, I have created a minimal "task tray" tool for you, through which the user can send the support information to the appropriate teams channel.
The tool also shows the PC name and the IP address used:

Task tray tool

I have already created the tool as Intunewin (so you only have to download this).
You can also find the installation files on GitHub:

You can then record the Intunewin as a Win32 app in your Intune environment.
This under: Apps > Windows apps
Here you upload the Intunewin file:

Intune, add Win32 app
Intune, upload intunewin

Then give the app a name and a meaningful description. You must also specify a publisher.
The logo is optional and is displayed when you publish the app to the company portal.

NameSupport Info
DescriptionAllows the user to send information about their device to the defined support team channel.

Intune, Win32 app info

Here you have to enter the install and uninstall command. This is:

install command%SystemRoot%\sysnative\WindowsPowerShell\v1.0\powershell.exe -windowstyle hidden -executionpolicy bypass -command .\install.ps1
uninstall command%SystemRoot%\sysnative\WindowsPowerShell\v1.0\powershell.exe -windowstyle hidden -executionpolicy bypass -command .\uninstall.ps1
Install behaviorsystem
Intune, Win32 App installation command

There are no special requirements for the app, but you have to fill them in.
For the detection rule I have prepared the file "check.ps1" for you.

Intune, Win32 App requirements
Intune, Win32 App detection

There are no dependencies or supersedence here.
All you have to do is assign the app to a group and that's it.

If the PowerShell window stays open for users, this is due to the PowerShell startup behavior that is set to "Windows Terminal" in the latest Windows versions. You would then simply have to switch to "Windows Console Host".
Here is how: Command Prompt and Windows Powershell for Windows 11 - Microsoft Support

Integration SelfX

Damien Van Robaeys did with the tool SelfX created a very cool program that is easy to provide custom scripts and bug fixes for end users.

If you want to include this script, you can copy it to the program folder and add the following lines to the XML (Issues_List.xml):

<Action> <Name>Send Device Information to Support</Name> <Explanation>Send Device Information like Device name, Username, Network and Group memberships to Support</Explanation> <script>SendToHelpdesk_Teams.ps1</script> <Category>Device</Category> <Alerte_MSG>Do you want to send your Device Information's for support purposes? </Alerte_MSG> </Action>
Code language: HTML, XML (xml)

Integration of System Information and Self Service Tool

Jannik Reinhard provides one with the tool System information and self-service tool primarily displays information about the device, but similar to SelfX also offers the option of integrating your own scripts.

Again, you can easily add the script by adding a file (_actions.json, lines 11-14):

{ "actions": [ { "actionName": "Clear recycle bin", "script": "Invoke-ClearRecycleBin.ps1" }, { "actionName": "Change Password", "script": "Invoke-ChangePassword.ps1" }, { "actionName": "Send Device Information to Support", "script": "SendToHelpdesk_Teams.ps1" } ] }
Code language: JSON / JSON with Comments (json)

2 thoughts on “Support Informationen an Teams Kanal senden”

  1. Hi Florian,

    Great stuff, thank you ๐Ÿ˜€.

    Is it possible to include when was the last time device was in Sync with Intune, Bitlocker encryption status and space left on C disk?

    1. Thanks!

      Yes, you can add additional queries.

      The disk space would be simple with: Get-PSDrive C
      For the last sync i'd rather triger a new sync with:
      $syncIme = New-Object -ComObject Shell.Application

      The BitLocker part is a bit mor difficult, cause you can't get the status easily without admin rights, bit this should do the trick:
      $BLStatus = (New-Object -ComObject Shell.Application).NameSpace('C:').Self.ExtendedProperty('System.Volume.BitLockerProtection')
      if($BLStatus -eq 0){$BLStatus = "Bitlocker status: Unencryptable"}
      elseif($BLStatus -eq 1){$BLStatus = "Bitlocker status: Encrypted"}
      elseif($BLStatus -eq 2){$BLStatus = "Bitlocker status: Not Encrypted"}
      else{$BLStatus = "Bitlocker status: Unknown"}

      Hope this helps you ๐Ÿ™‚

Leave a Reply

Your email address will not be published. Required fields are marked *