Skip to content

Instantly share code, notes, and snippets.

View dbirks's full-sized avatar
🫎

David Birks dbirks

🫎
View GitHub Profile
@dbirks
dbirks / change-last-logged-on-user-windows-10.md
Last active November 12, 2025 08:02
Change last logged on user on Windows 10

In Windows 10 you can no longer change the last logged on user in the registry like you could in Windows 7. Windows 10 requires the user's SID to be entered as well. Here's an updated guide.

In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI, you'll want to change 4 entries:

  • LastLoggedOnDisplayName
    • Enter the user's full name, like Allan Jude
  • LastLoggedOnSAMUser
    • Enter the username, like SHORTDOMAIN\allan.jude
  • LastLoggedOnUser
  • Enter the username again, like SHORTDOMAIN\allan.jude
@dbirks
dbirks / keybase.md
Created September 25, 2017 22:27
Keybase proof

Keybase proof

I hereby claim:

  • I am dbirks on github.
  • I am dbirks (https://keybase.io/dbirks) on keybase.
  • I have a public key ASAHM3aYP5st_vS0TpuHY_4j8MrM26zQNHcHxKFMrVhGGwo To claim this, I am signing this object:
{
  "body": {
    "key": {
@dbirks
dbirks / mailbox-recursive-access.md
Last active January 4, 2023 12:31
Give a user access recursively to another mailbox's folders

Give a user access recursively to another mailbox's folders

I was running into a problem giving a user access to another user's mailbox, where the user was only getting permission to view the top level folders, while the subfolders had no viewing permissions set on them.

Here's the way to set permissions on each folder recursively if all else fails.

In this example, we are giving Mike editor privileges on Kukuri's mailbox folders.

ForEach($f in (Get-MailboxFolderStatistics kukuri@company.com | Where { $_.FolderPath.Contains("/") -eq $True } ) ) {
@dbirks
dbirks / arch-install-notes.md
Last active July 27, 2018 15:21
Arch install notes

Rank repo mirrors

rankmirrors is included in the pacman-contrib package.

Make a backup, then run the rankmirrors script through sed to remove some extra commented-out lines.

mv /etc/pacman.d/mirrorlist{,.old}
@dbirks
dbirks / change-room-booking.md
Created November 2, 2017 13:37
Change how far in advance you can book a room in Exchange

For Office 365, the default time into the future you can book a room looks to be 180 days. Find out the current time with:

Get-CalendarProcessing -Identity "Conference Room" | select BookingWindowInDays

You can then set the window to the maximum of 1080 days with:

Set-CalendarProcessing -Identity "Conference Room" -BookingWindowInDays 1080
@dbirks
dbirks / chan-setup-notes
Last active December 8, 2017 09:48
chan setup notes
https://github.com/arisu-dev/arisuchan
debian 9
apt install git apache2 mysql-server php php-mbstring php-gd php-pdo imagemagick php-mysql php-mcrypt
systemctl enable --now apache2
mysql_secure_installation
@dbirks
dbirks / helpful-powershell-commands.md
Last active June 21, 2018 15:09
Helpful Powershell commands

Helpful Powershell commands

Add a computer to the domain

Add-Computer -DomainName corp.contoso.com 

I've found the FQDN is required in my environment.

@dbirks
dbirks / shared-inbox-notes.md
Last active May 11, 2018 19:46
Exchange shared inbox notes

Exchange shared inbox notes

Copy sent emails to the shared inbox's sent folder

For emails sent as from the shared inbox, make a copy of the email in the shared inbox's sent items folder as well.

set-mailbox <mailbox name> -MessageCopyForSentAsEnabled $True
@dbirks
dbirks / google-analytics-for-static-sites.sh
Created February 8, 2018 23:30 — forked from stevenscg/google-analytics-for-static-sites.sh
Add Google Analytics tracking to an existing static website
#!/bin/sh
#
# Add a Google Analytics tag to static website files
# @see http://adambuchanan.me/post/26345221717/updating-google-analytics-code-on-many-static-pages
# Tested on MacOS 10.8.X
#
# Usage:
# Set the GA parameters below
# Execute the script from the top-level of the static site
#