Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am mdavis332 on github.
* I am michaeladavis (https://keybase.io/michaeladavis) on keybase.
* I have a public key ASBiakKkZ6GFZp8Bzy8Botp4RLZIDukFgtcZJDpfsV6hTAo
To claim this, I am signing this object:
@mdavis332
mdavis332 / Get-EmailsOfGroupMembersRecursively.ps1
Created October 11, 2018 14:32
Get the email addresses of group members using a CN path and ldap query.
$SaveLocation = "$home\Desktop\emails.csv"
Write-Output 'Querying for email addresses of all group members. This may take a few minutes...'
$Searcher = New-Object DirectoryServices.DirectorySearcher
$Filter = '(&(objectCategory=person)(ObjectClass=user)(|(memberOf:1.2.840.113556.1.4.1941:=CN=AllFaculty,OU=Staff Faculty,DC=domain,DC=local)(memberOf:1.2.840.113556.1.4.1941:=CN=Allstaff,OU=Staff Faculty,DC=domain,DC=local)(memberOf:1.2.840.113556.1.4.1941:=CN=AllAdjunct,OU=Staff Faculty,DC=domain,DC=local))(!(userAccountControl:1.2.840.113556.1.4.803:=2)))'
$Searcher.Filter = $Filter
$Searcher.SearchRoot = 'LDAP://DC=domain,DC=local'
$Users = $Searcher.FindAll()
https://stackoverflow.com/questions/1026483/is-there-a-way-to-crack-the-password-on-an-excel-vba-project
code credited to Siwtom (nick name), a Vietnamese developer
1. Open the file(s) that contain your locked VGA projects
2. Create a new xlsm file and store this code in Module 1
Option Explicit
Private Const PAGE_EXECUTE_READWRITE = &H40
@mdavis332
mdavis332 / firefox.csv
Last active July 26, 2018 15:52
Linked to Medium.com article
Explanation Mozilla.cfg Group Policy Setting
Don't show the Firefox has been upgraded page lockPref(''browser.startup.homepage_override.mstone'' - ''ignore''); Override the upgrade page (Enabled)
Don't check for the default browser lockPref(''browser.shell.checkDefaultBrowser'' - false); Don't Check Default Browser (Enabled)
Do not send stats/telemetry lockPref(''toolkit.telemetry.*'' - <various>); Disable Telemetry (Enabled)
Hide Know your rights lockPref(''browser.rights.3.shown'' - true); Override the first run page (Enabled)
# Disabled by default as of Win 1709
Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol -NoRestart
0473e793c0796e68b866a80e93bb8aa58abd4f2e34a1af62dd1468d3c08466eb43bb8642e7c2b0e908aa71976078c0341d41d82f9880eaebcfec4d567227656ad9;jmatty1983