Skip to content

meanstackofdoom/Powershell-Scripts-Teams

Repository files navigation

PowerShell Scripts

A collection of scripts which are currently active and working that I have designed over the years, currently uploading, feel free to use.

Powershell Read me
Powershell Security
Powershell Scripts Code Of Conduct
Contribution to Powershell Scripts Repository


Ping_status.ps1

Check out the Device Teams Ping script on GitHub:

Ping Status Script

Script written in PowerShell to post to Teams using the Teams webhook.

Ping Server Status Report

Date: 2023-09-10 15:36:55

Office1

  • Device: SERVER1 | IP: 192.168.1.1 | Status: Online | Response Time: 21 ms | Packet Loss: 0%
  • Device: SERVER2 | IP: 192.168.1.2 | Status: Online | Response Time: 23 ms | Packet Loss: 0%

Office2

  • Device: SERVER3 | IP: 192.168.1.3 | Status: Online | Response Time: 1 ms | Packet Loss: 0%
  • Device: SERVER4 | IP: 192.168.1.4 | Status: Online | Response Time: 1 ms | Packet Loss: 0%

weather_status.ps1

Check out the Teams Weather script on GitHub:

Teams Weather Status

Script written to update the weather from weatherapi.com to a dedicated Teams channel.

Weather Update for Canberra, Australia

  • Location : Canberra, ACT, Australia
  • Weather Condition
  • Local Time: 2023-09-10 16:09
  • Temperature (Feels Like): 17.0°C
  • Wind: ESE 19.1 km/h at 120°
  • Precipitation: 4.0 mm
  • UV Index: 5.0
  • Wind Gust: 16.6 km/h
  • Sunrise: 06:04 AM
  • Sunset: 05:40 PM
  • Moonrise: 12:35 AM
  • Moonset: 10:27 AM
  • Moon Phase: Waning Crescent
  • Moon Illumination: 49
  • Last Hour Weather Condition: Partly cloudy

3-Day Forecast for Canberra, Australia

  • 2023-09-10 Max Temp: 16.0°C (60.8°F) Min Temp: 8.1°C (46.6°F) Condition: Sunny
  • 2023-09-11 Max Temp: 16.9°C (62.4°F) Min Temp: 9.1°C (48.4°F) Condition: Sunny
  • 2023-09-12 Max Temp: 18.7°C (65.7°F) Min Temp: 12.4°C (54.3°F) Condition: Patchy rain possible

check_enrolment.ps1

Check out the Teams enrolled intune script on GitHub:

Device Enrollment

This script is designed to monitor Intune-managed devices and send notifications to a Microsoft Teams channel when new devices are enrolled within the last 6 hours. It continues to run indefinitely

The script performs the following tasks:

  1. Checks for the presence of the "Microsoft.Graph.Intune" PowerShell module and installs it if missing.
  2. Establishes a connection to Microsoft Graph.
  3. Updates the Microsoft Graph environment schema to the beta version.
  4. Calculates a time threshold to determine if any devices were enrolled within a specified time frame (default is 6 hours).
  5. Queries Intune-managed devices that meet the enrollment criteria.
  6. Sends a message to a Microsoft Teams channel with details of the enrolled devices, if any.
  7. Repeats the monitoring process at regular intervals.

.NOTES

  • You should replace the webhook URLs with your actual Microsoft Teams webhook URLs.
  • Customize the script as needed for your environment.
  • Ensure that the "Run-IntuneCheck" function, which is referenced but not defined in this script, is defined elsewhere in your environment.

check_sync.ps1

Check out the Teams enrolled intune script on GitHub:

Device Sync

This PowerShell script periodically checks the status of Microsoft Intune-managed devices to identify those that haven't synced in a specified timeframe. It then sends a detailed report to a Microsoft Teams channel using a webhook, allowing for proactive device management and monitoring


About

Powershell Scripts

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors