Skip to content

Instantly share code, notes, and snippets.

View Trimad's full-sized avatar
😡
AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH

Scream Skellygore Trimad

😡
AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
View GitHub Profile
@Trimad
Trimad / exchange.ps1
Last active July 6, 2021 13:56
Exchange and Office365 Powershell Tricks
#Login to Exchange Online
#Replace <UPN> with your admin email account
#Reference: https://docs.microsoft.com/en-us/powershell/exchange/connect-to-exchange-online-powershell?view=exchange-ps
Import-Module ExchangeOnlineManagement
Connect-ExchangeOnline -UserPrincipalName <UPN>
@Trimad
Trimad / uri.ps1
Last active October 13, 2021 15:47
Windows Settings URI Reference
# Accounts
# Access work or school
ms-settings:workplace
# Email & app accounts
ms-settings:emailandaccounts
# Family & other people
ms-settings:otherusers
# Set up a kiosk
ms-settings:assignedaccess
@Trimad
Trimad / Collatz.pde
Created September 4, 2019 07:53
Collatz Conjecture
import java.util.*;
int howMany = 361;
int howManyFrames = 9840; //2:44 @ 60FPS
int size=30;
Stack[] stacks = new Stack[howMany];
Turtle[] turtles = new Turtle[howMany];
void setup() {
/*************
Tristan Madden
08-28-2019
**************/
float x = 0;
float y = 0;
float[][] magicX = {
{0.00, 0.00},
# Microsoft apps can be removed individually with wildcard support like so:
Get-Appxpackage *Bing* | Remove-Appxpackage
Get-Appxpackage *News* |Remove-Appxpackage
Get-Appxpackage *Office* | Remove-Appxpackage
Get-Appxpackage *Skype* | Remove-Appxpackage
Get-Appxpackage *Solitaire* |Remove-Appxpackage
Get-Appxpackage *Sports* |Remove-Appxpackage
Get-Appxpackage *Weather* |Remove-Appxpackage
Get-Appxpackage *Xbox* | Remove-Appxpackage
Get-Appxpackage *Zune* | Remove-Appxpackage
#Step 1. Load your targets into an array from a text file.
$Targets = Get-Content 'targets.txt'
#Step 2. Create a DataTable
$table = New-Object system.Data.DataTable "MyTable"
$col1 = New-Object system.Data.DataColumn Computer,([string])
$col2 = New-Object system.Data.DataColumn Status,([string])
$table.columns.add($col1)
$table.columns.add($col2)
#View Scheduler Configuration
Import-Module ADSync
Get-ADSyncScheduler
#Delta Active Directory Sync
Import-Module ADSync
Start-ADSyncSyncCycle -PolicyType Delta
#Full Azure Active Directory Sync
Import-Module ADSync
@Trimad
Trimad / ActiveDirectory.ps1
Created August 28, 2019 23:19
PowerShell Script-Fu for Active Directory
#Export a table of last logon dates for every domain computer
import-module ActiveDirectory
Get-ADComputer -Filter * -Property * | Format-Table Name,lastLogonDate,OperatingSystem,OperatingSystemVersion –Auto | Out-File 'file.txt' -Append
@Trimad
Trimad / EnableAdminAutoLogon.ps1
Last active July 9, 2019 02:15
Make all the necessary registry entries to enable AutoAdminLogon as a domain user.
$path ="HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
$aal = "1"
#The only modifications you need to make are to the following 3 variables:
$ddn = "yourdomain.org"
$dp = "DEFAULT PASSWORD"
$dun = "DEFAULT USER NAME"
function RegistryEntry {
param( [string]$name, [string]$value )
import java.util.Scanner;
public class Kattis {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {