Skip to content

Instantly share code, notes, and snippets.

@rajan-chari
rajan-chari / teams-dev.ps1
Last active September 11, 2025 20:12
Invoke CreateTunnel and Provision from powershell command line
#!/usr/bin/env pwsh
# teams-dev.ps1 - CLI wrapper for teams-dev-functions.ps1
# Usage: teams-dev.ps1 <subcommand> [options]
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
# Teams Development Functions for PowerShell
# PowerShell equivalents of the custom shell functions for Teams app development
function Create-Tunnel {
<#
[HttpPost("/api/messages")]
public async Task<IResult> OnMessage()
{
// [PA POC] Handle reactive scenario w/ BotBuilder adapter.
// [PA POC] For phased migration, BotBuilder adapter still used.
HttpContext.Request.EnableBuffering();
var body = await new StreamReader(Request.Body).ReadToEndAsync();
Activity? activity = JsonSerializer.Deserialize<Activity>(body);