Skip to content

Instantly share code, notes, and snippets.

@joegasper
joegasper / export-team-membership-roster.js
Last active April 9, 2024 15:22 — forked from guillaumemeyer/export-team-membership-roster.js
Exports the owners and members of a Microsoft Teams team as a CSV file
// ****************************************************************************************************************************
// Abstract:
// This script is just a quick trick to export the owners and members of a team as a CSV file without administrator permissions.
// The following properties are exported: Display name, Title, Location, Role, Tags, UPN(email)
//
// Usage:
// 1. Open the team in your web browser: https://teams.microsoft.com
// 2. Select "Manage team" from its menu.
// 3. Select the "Members" tab.
// 4. Expand the "Owners" and "Members and guests" sections.
@joegasper
joegasper / windows_hardening.cmd
Created November 27, 2022 03:17 — forked from mackwage/windows_hardening.cmd
Script to perform some hardening of Windows OS
:: Windows 10 Hardening Script
:: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering.
:: Obligatory 'views are my own'. :)
:: Thank you @jaredhaight for the Win Firewall config recommendations!
:: Thank you @ricardojba for the DLL Safe Order Search reg key!
:: Thank you @jessicaknotts for the help on testing Exploit Guard configs and checking privacy settings!
:: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater
:
@joegasper
joegasper / Get internet headers.OUTLOOK.yaml
Last active November 27, 2023 19:28
Gets internet headers on a message in Read mode.
name: Get internet headers
description: Gets internet headers on a message in Read mode.
host: OUTLOOK
api_set: {}
script:
content: |
$("#run").click(run);
function run() {
Office.context.mailbox.item.getAllInternetHeadersAsync(function(asyncResult) {
@joegasper
joegasper / New-DicePassPhrase7.ps1
Created September 13, 2021 21:51
Generate a password/passphrase based on a dice password list - only PowerShell Core/7 - added support for parallel foreach
<#
.SYNOPSIS
Returns a passphrase
.DESCRIPTION
Returns a passphrase based on a dice password list.
.EXAMPLE
New-DicePassPhrase
miles welt eta pall 41st
@joegasper
joegasper / New-DicePassPhrase.ps1
Last active February 28, 2024 22:00
Generate a password/passphrase based on a dice password list
<#
.SYNOPSIS
Returns a passphrase
.DESCRIPTION
Returns a passphrase based on a dice password list.
.EXAMPLE
New-DicePassPhrase
miles welt eta pall 41st
@joegasper
joegasper / Get-365GroupsForUser.ps1
Last active September 2, 2021 11:32
Get-365GroupsForUser.ps1
<#
.Synopsis
Microsoft 365 Group membership for a user or summary report
.DESCRIPTION
Output a list of a user's modern group memberships (Teams, Yammer, Planner, Groups) or summary report
.EXAMPLE
Get-365GroupsForUser -UserName pvenkman | sort DisplayName | select DisplayName,Description
.EXAMPLE
Get-365GroupsForUser -UserName pvenkman | select DisplayName,Created,Description | Export-Csv -Path .\Grps.csv -NoTypeInformation
.EXAMPLE
@joegasper
joegasper / KalturaDownload.txt
Created December 9, 2020 06:41
Download Kaltura Video
You can get the videos from Kaltura.
In the code in the iframe player, in the <script> section with the comment "// Initialize the iframe with associated setup", the "downloadUrl" value is the path to the source video file.
"downloadUrl":"https:\/\/cdnapisec.kaltura.com\/p\/1727781\/sp\/172778100\/playManifest\/entryId\/1_6em2hqfj\/format\/download\/protocol\/https\/flavorParamIds\/0"
You can put that value as is straight into your browser's address bar and it will download the video.
After downloading, this is the path the browser saw as the download link.
https://cfvod.kaltura.com/pd/p/1727781/sp/172778100/serveFlavor/entryId/1_6em2hqfj/v/51/ev/35/flavorId/1_15xqmt35/fileName/18-RJA-1154_RJA_Culture_Video_(Source).mp4/name/a.mp4
The file downloaded as: 18-RJA-1154_RJA_Culture_Video_(Source).mp4
@joegasper
joegasper / mslists-asset-manager-asset-gallery.json
Created November 4, 2020 23:44
MS Lists - Asset manager Asset gallery JSON code as of 11/4/2020 - fixed for Device Photo
@joegasper
joegasper / Create-DriveSubstituteWithRecycleBinSupport.ps1
Created August 5, 2020 04:38
Create Windows persistent drive substitute with support for Recycle Bin ( subst psubst )
# Run elevated. Reboot is required.
# Enter your drive substitute and path
$DriveLetter = 'D'
$MapPath = 'C:\GitHub'
# Inspired by https://superuser.com/questions/29072/how-to-make-subst-mapping-persistent-across-reboots
# Do not edit below
# Setup GUID in standard Registry notation
$GUID = '{' + [guid]::NewGuid().ToString() + '}'
# Setup Registry locations
@joegasper
joegasper / ConvertTo-SRT.ps1
Last active July 10, 2023 01:53
Convert VTT files to SRT format
<#
.SYNOPSIS
Fast conversion of Microsoft Stream VTT subtitle file to SRT format.
.DESCRIPTION
Uses select-string instead of get-content to improve speed 2 magnitudes.
.PARAMETER Path
Specifies the path to the VTT text file (mandatory).
.PARAMETER OutFile
Specifies the path to the output SRT text file (defaults to input file with .srt).
.EXAMPLE