This file contains hidden or 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
| <# ------------------------------------------------------------ | |
| UnhideFromGAL_FromExport_WithStatusCsv.ps1 | |
| Uses the export CSV from the proxy export (Identity,Type,Value). | |
| Processes UNIQUE identities and sets: | |
| HiddenFromAddressListsEnabled = $false | |
| Writes a status CSV in the same format as the import CSV log: | |
| Identity,Type,Value,Status,Message,Timestamp |
This file contains hidden or 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
| <# ------------------------------------------------------------ | |
| Import_Primary_SMTP_X500_AddMissingOnly_WithStatusCsv.ps1 | |
| Reads: Identity,Type,Value | |
| Writes: Identity,Type,Value,Status,Message,Timestamp | |
| ADD MISSING ONLY: | |
| - SMTP (Type=SMTP) -> adds secondary proxy (forces smtp:) | |
| - X500 (Type=X500) -> adds x500: | |
| - PrimarySMTP (Type=PrimarySMTP) -> optionally sets primary (controlled by $ApplyPrimarySMTP) |
This file contains hidden or 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
| # Requires: Microsoft.Graph PowerShell module | |
| # Install (once): Install-Module Microsoft.Graph -Scope CurrentUser | |
| $CsvPath = "C:\Temp\users.csv" | |
| $GroupId = "00000000-0000-0000-0000-000000000000" # <-- Security Group ObjectId | |
| # Connect to Microsoft Graph | |
| # You may be prompted to sign in and consent | |
| Connect-MgGraph -Scopes "Group.ReadWrite.All","User.Read.All" |
This file contains hidden or 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
| # Connect to Microsoft Graph | |
| Connect-MgGraph -Scopes "Group.ReadWrite.All" | |
| # Add in Entra Group ID of the Existing Group below | |
| $sourceGroupId = "<ExistingGroupObjectId>" | |
| # Fetch ALL members | |
| $members = Get-MgGroupMember -GroupId $sourceGroupId -All | |
| # Create the new Group |
This file contains hidden or 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
| # Run with "powershell -ExecutionPolicy Bypass -File .\Get-EntraSubordinates-WithManagerOnly.ps1" | |
| # Connect to Microsoft Graph | |
| Connect-MgGraph -Scopes "User.Read.All", "Directory.Read.All" | |
| # Function to recursively retrieve all subordinates under a manager | |
| function Get-SubordinatesRecursive { | |
| param ( | |
| [string]$ManagerId, | |
| [hashtable]$Visited, |
This file contains hidden or 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
| <# | |
| Type : Detection | |
| Job: Detects Microsoft 3D Viewer | |
| Run as: System | |
| Context: 64 Bit | |
| #> | |
| # Replace with part or full name of the app package | |
| $appName = "Microsoft.Microsoft3DViewer" |
This file contains hidden or 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
| <# | |
| Type: Detection | |
| Job: Detects Registry Key and if present or not | |
| Run as: System | |
| Context: 64 Bit | |
| #> | |
| # Define Varibles | |
| $regPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client" | |
| $regName = "AllowBasic" |
This file contains hidden or 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
| # Sample Script for Win32 Application to set a reg key and monitor it. | |
| $regPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client" | |
| $valueName = "AllowBasic" | |
| $desiredValue = 0 | |
| # Ensure the registry key exists | |
| if (-not (Test-Path $regPath)) { | |
| New-Item -Path $regPath -Force | Out-Null | |
| } |
This file contains hidden or 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
| # Install the Teams Module within PowerShell | |
| Install-Module MicrosoftTeams | |
| # Connect to Microsoft Teams PowerShell | |
| Connect-MicrosoftTeams | |
| #Get list of Users and export their details to csv | |
| Get-CsOnlineUser -Filter {LineURI -ne $Null} | select DisplayName,LineURI,OnlineVoiceRoutingPolicy | Export-CSV c:\temp\teams.csv -NoTypeInformation |
NewerOlder