EvotecIT / PSTeams

PSTeams is a PowerShell Module working on Windows / Linux and Mac. It allows sending notifications to Microsoft Teams via WebHook Notifications. It's pretty flexible and provides a bunch of options. Initially, it only supported one sort of Team Cards but since version 2.X.X it supports Adaptive Cards, Hero Cards, List Cards, and Thumbnail Cards. All those new cards have their own cmdlets and the old version of creating Teams Cards stays as-is for compatibility reasons.
MIT License
409 stars 41 forks source link

Enable use of proxy when sending Teams messages #44

Closed theramiyer closed 2 years ago

theramiyer commented 2 years ago

Some environments sit behind a proxy. Can we enable specifying the proxy with Send-TeamsMessage?

theramiyer commented 2 years ago

If this feature is okay to implement, I would like to contribute (here is the commit). However, I'm unable to figure out how to write a Pester test for use with the proxy. Would like some help there.

Thanks in advance! :)

PrzemyslawKlys commented 2 years ago

Hi, seems nice, but probably should be [URI] instead of [string] as Invoke-RestMethod takes that as an argument. Feel free to create PR

theramiyer commented 2 years ago

Thank you! I'll modify that. Also, I'm wondering how to write a Pester test for this; can we use a public proxy? Or can we skip the test for this parameter?

PrzemyslawKlys commented 2 years ago

I am not sure I trust public proxy unless it's some company like Mozilla or Cloduflare. So pester test only if that proxy is kind of trusted.

theramiyer commented 2 years ago

I don't know of a trusted proxy. Given that the information is passed as-is, can we skip the test for this parameter?

theramiyer commented 2 years ago

Created pull request #45 for this.

theramiyer commented 2 years ago

Can we close this issue? I'm unaware of the convention here. :)

PrzemyslawKlys commented 2 years ago

Yup, i'll release new version soon