This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Post active vSphere alarms to a Microsoft Teams channel. | |
.DESCRIPTION | |
Connect to the specified vSphere vCenter, query for all active alarms, and post those | |
as a card to Microsoft Teams via a Webhook. | |
The card will contain one section per alarm with a few facts: the cluster involved, | |
the date and time of the alarm, the alarm status (yellow/red/etc), and whether |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get settings to enter on the Identity Provider (IdP) to allow authentication to Service Provider (SP) | |
function Get-IdP-Settings-From-SP($Metadata) { | |
[xml]$SPMetadata = $Metadata | |
$SPAssertionConsumerServiceURL = $SPMetadata.EntityDescriptor.SPSSODescriptor.AssertionConsumerService | | |
? {$_.Binding -eq "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"} | | |
% {$_.Location} | |
$SPIssuerURI = $SPMetadata.EntityDescriptor.entityID | |
$SPSignatureCertificate = $SPMetadata.EntityDescriptor.SPSSODescriptor.KeyDescriptor | | |
? {$_.use -eq "signing"} | | |
Select-Object -Last 1 | |