Skip to content

Instantly share code, notes, and snippets.

@m2021acct
m2021acct / AADRiskySigninsNotification.ps1
Created March 26, 2024 11:51 — forked from mrik23/AADRiskySigninsNotification.ps1
PowerShell script using the Microsoft Graph REST API to retrieve Azure AD Risky Sign-ins events and send an email notification using also the Microsoft Graph API. This script can be used in Azure Function and using the application settings variables. Go to https://medium.com/@zaab_it/azure-ad-risky-sign-ins-email-notification-6cbfac32f6de for mo…
<#
This script retrieves Azure Active Directory Risk Sign-in Events from the Microsoft Graph API and send an email alert report.
Only the active events from the last 30 days will be retrieved (that can be modified via the $filter value in uriGraphEndpoint or removed to get all events).
See the official documentation for more info:
https://docs.microsoft.com/en-us/azure/active-directory/active-directory-identityprotection-graph-getting-started
https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_sendmail
#>
@m2021acct
m2021acct / PSContain.ps1
Created November 16, 2021 20:03
PSContain - Crowdsrike RTR
##################################################################################
# ____ _____ ______ __ _
# / __ \ / ___/ / ____/ ____ ____ / /_ ____ _ (_) ____
# / /_/ / \__ \ / / / __ \ / __ \ / __/ / __ `/ / / / __ \
# / ____/ ___/ / / /___ / /_/ / / / / // /_ / /_/ / / / / / / /
# /_/ /____/ \____/ \____/ /_/ /_/ \__/ \__,_/ /_/ /_/ /_/
#
##################################################################################
#
# This script will use the CS API to stop network connectivity on workstations that