![]() The following script ensures that the necessary module is installed and imported into the system: # ModuleCheck: Installs PSTeams if not already available The script triggers an alert for drive C as soon as less than 60 percent of disk space is free A practical value here would be 10 to 20 percent free drive storage. Note: 60 is very high as a threshold and is only used to trigger an alert for demonstration purposes. # TeamsID = URL generated by the connector # Free memory in percent, from which an alert is to be triggered For a larger number, a CSV import into an array is recommended. The data include the servers to be queried, a threshold that triggers the alert, the Teams connector ID, and the URL of your WAC.Īny number of additional computers may be added to the array of computer names. Explanation of the PowerShell script ^īefore the actual design of the action card, various inputs must be gathered. Therefore, the PowerShell community has developed a special module for this purpose: PSTeams. PowerShell provides cmdlets to create and edit JSON files, but creating an action card with them is relatively cumbersome. ![]() Hence, besides PowerShell, curl and other services can also be used to send the webhook. The standardized JSON format, in conjunction with an HTTP request, allows you to use webhooks independently of the underlying platform. The same steps are required for action cards. I cover the configuration of a Teams Connector for webhooks in the article above. ![]() Action cards are declared via a JSON file and sent over an HTTP post to the Teams Connector URL.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |