Skip to content

Instantly share code, notes, and snippets.

View Shellgio's full-sized avatar

Sergio G. Shellgio

View GitHub Profile
@psignoret
psignoret / Get-AzureADPSPermissions.ps1
Last active October 28, 2025 09:19
Script to list all delegated permissions and application permissions in Microsoft Entra ID
# THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF
# FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
#Requires -Modules @{ ModuleName="Microsoft.Graph.Authentication" ; ModuleVersion="2.15.0" }
#Requires -Modules @{ ModuleName="Microsoft.Graph.DirectoryObjects"; ModuleVersion="2.15.0" }
#Requires -Modules @{ ModuleName="Microsoft.Graph.Identity.SignIns"; ModuleVersion="2.15.0" }
#Requires -Modules @{ ModuleName="Microsoft.Graph.Applications" ; ModuleVersion="2.15.0" }
#Requires -Modules @{ ModuleName="Microsoft.Graph.Users" ; ModuleVersion="2.15.0" }
<#
function Get-RdpLogonEvent
{
[CmdletBinding()]
param(
[Int32] $Last = 10
)
$RdpInteractiveLogons = Get-WinEvent -FilterHashtable @{
LogName='Security'
ProviderName='Microsoft-Windows-Security-Auditing'
{
"version": "1.23.16",
"notificationList": [],
"monitorList": [
{
"id": 2,
"name": "Cloudflare - 104.21.16.1",
"description": null,
"pathName": "Cloudflare - 104.21.16.1",
"parent": null,
@diecknet
diecknet / Disable-Direct-Send.ps1
Last active August 6, 2025 22:08
Exchange Online Direct Send
# Requires ExchangeOnlineManagement PowerShell module
# if you don't have it yet, install it by running: Install-Module ExchangeOnlineManagement
Connect-ExchangeOnline
Set-OrganizationConfig -RejectDirectSend $true
Disconnect-ExchangeOnline