Teknickal's SysAdmin Projects & PowerShell Snippets

A work-in-progress portfolio highlighting my technical skills, projects, and passions—more coming soon. It is hosted on GitHub pages using my own custom domain name.
I'm not a programmer or webdev by any means, just a humble SysAdmin. I wrote some of the HTML for this site by hand but a lot of the formatting and structure was made possible with the help of ChatGPT.
When used responsibly, AI tools like ChatGPT can supplement and augment our technical skills—-not replace them.

(last update 8/6/2025)

🛠️ Projects

SolNexus

This project dubbed "SolNexus" involved many collaborators to design, engineer, and build a practical and cost effective solution for enabling high speed internet access at remote solar field job sites in extreme weather conditions using a Starlink satellite, Mikrotik router+PoE Switch, and Unifi U7 Outdoor WAPs.

Will add some photos and details soon!

DataVault

This project converts a standard tool vault into a mobile remote workstation. Provided with 5G antenna and router, laptop docking station, and large format screen to enable foremen in urban remote sites to access their resources at the job site where cellular service may be weak.

Will add some photos and details soon!

⚡ PowerShell Snippets - Some Useful Powershell Commands I've written or collected over the years.

Exchange Online Tips and Tricks

To connect to Microsoft Office 365 Exchange Online powershell interface we must first run Powershell as administrator and install and import the modules.

Install-Module ExchangeOnlineManagement
Import-Module ExchangeOnlineManagement
Connect-ExchangeOnline
Add full access permissions without mapping
Add-MailboxPermission -Identity "username of person you want to get permissions from" -User "username of person you want to give permissions to" -AccessRights FullAccess -InheritanceType All -AutoMapping $false

Example: I want to give Nick full access to Devin's exchange mailbox.

Add-MailboxPermission -Identity devintownsend -User nick -AccessRights FullAccess -InheritanceType All -AutoMapping $false
Add full access permissions with mapping
Add-MailboxPermission -Identity "username of person you want to get permissions from" -User "username of person you want to give permissions to" -AccessRights FullAccess -InheritanceType All -AutoMapping $true

Example: I want to give Nick full access to Maynard's exchange mailbox, and have it appear in the Outlook mailbox listing automatically (In Outlook "Classic" at least!)

Add-MailboxPermission -Identity mjkeenan -User nick -AccessRights FullAccess -InheritanceType All -AutoMapping $true
Add access to another user's calendar
Add-MailboxFolderPermission "username of person you want to get permissions from":\calendar -User "username of perosn you want to give permissions to" -AccessRights Editor -SharingPermissionFlags None

Example: I want to give Nick full editor permissions to Mikael's calendar

Add-MailboxFolderPermission makerfeldt:\calendar -User nick -AccessRights Editor -SharingPermissionFlags None
Breakdown of mailbox folder sizes
Get-MailboxFolderStatistics "username" | Select Name,FolderSize,ItemsinFolder

Example: I want to see what folders are taking up space in Bruce's Mailbox

Get-MailboxFolderStatistics bdickenson | Select Name,FolderSize,ItemsinFolder
Wider view of mailbox folder sizes
Get-MailboxFolderStatistics "username" -FolderScope Inbox | Select Name,FolderandSubFolderSize,ItemsinFolderandSubfolders

Example: I want to see a more detailed view of the folders and sizes for James' mailbox

Get-MailboxFolderStatistics jlabrie -FolderScope Inbox | Select Name,FolderandSubFolderSize,ItemsinFolderandSubfolders
Get the current size and the total number of items in folders and subfolders in the Recoverable Items folder
Get-MailboxFolderStatistics "username" -FolderScope RecoverableItems | FL Name,FolderAndSubfolderSize,ItemsInFolderAndSubfolders

Example: Geddy emptied his deleted items but doesn't remember when, we want to see how much is recoverable.

Get-MailboxFolderStatistics glee -FolderScope RecoverableItems | FL Name,FolderAndSubfolderSize,ItemsInFolderAndSubfolders
Purge deleted items (On-premise Exchange Only)
Search-Mailbox -Identity "username" -SearchDumpsterOnly -TargetMailbox "Discovery Search Mailbox" -TargetFolder "username-RecoverableItems" -DeleteContent

Example: Perhaps useful for an on-premise exchange scenario, where we're getting ready to migrate Dave's mailbox to 365. They've emptied deleted items already but we want to purge the deleted items to speed up the transfer, or the mailbox is over the 50GB limit.

Search-Mailbox -Identity dmustaine -SearchDumpsterOnly -TargetMailbox "Discovery Search Mailbox" -TargetFolder "dmustaine-RecoverableItems" -DeleteContent
Allow or Disallow conflicts on a room calendar
Set-CalendarProcessing -Identity "Calendar/Resource Name" -AllowConflicts $true/$false

Example: For some reason you want to allow multiple people to book the main conference room at the same time. Or for some reason, someone has done this and you want to undo it.

Set-CalendarProcessing -Identity "Main Conference Room" -AllowConflicts $true
Set-CalendarProcessing -Identity "Main Conference Room" -AllowConflicts $false
Windows 10/11 Tips and Tricks
List drive letters
wmic logicaldisk get name
General repair for a windows install on a different drive, (replace X with drive letter, usually C if in Startup Repair)
sfc /scannow /offbootdir=c:\ /offwindir=c:\windows
General repair for a windows install on a different drive, (replace X with drive letter, usually C if in Startup Repair)
dism /image:X:\ /cleanup-image /restorehealth
Revert pending windows updates preventing startup (9/10 times this fixes the spinny wheel of startup death!)
dism.exe /image:C:\ /cleanup-image /revertpendingactions
Disable "modern standby" and revert to standard S3 sleep (doesn't work on a lot of newer laptops that only support modern standby 🤬)
reg add HKLM\System\CurrentControlSet\Control\Power /v PlatformAoAcOverride /t REG_DWORD /d 0
powercfg -h off
Miscellaneous Windows Server
Show when password was last changed for ALL users
Get-ADUser -Filter * -Properties PasswordLastSet | Sort-Object -Property PasswordLastSet | Select-Object Name, PasswordLastSet
Show when password was last changed for specific user
Get-ADUser -identity "username" -properties passwordlastset, passwordneverexpires | sort name | ft Name, passwordlastset, Passwordneverexpire

Example: I want to find out when Ozzy last changed his password.

Get-ADUser -identity oosbourne -properties passwordlastset, passwordneverexpires | sort name | ft Name, passwordlastset, Passwordneverexpire
Mitel On-Premise (Legacy)

Mitel (formerly Shortel) on-premise isn't a very common or modern PBX these days, but years ago when I needed to migrate the server portion from Windows Server 2008 up to Server 2019 and upgrade the app from Shortel to Mitel, we had all kinds of issues. The following commands helped get things back up and running smoothly.

First, open a command prompt as an admin and CD to the following directory

cd "C:\Program Files (x86)\Shoreline Communications\ShoreWare Server"
Stop all services
quickinstall -stopall
Fix for several services like TDI not starting. This will remove entries of the existing TDI Media Driver and re-add it.
quickinstall -mediaout
quickinstall -mediain

Then, open Registry Editor to the following key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ShoreTel-Media

Update the image path from the current entry to the following

\??\C:\Windows\System32\TDIMedia.sys
Fix for Mysql and associated services not starting

Navigate to: C:\Program Files (x86)\Shoreline Communications\ShoreWare Server\MySQL\MySQL Server
Edit mycdr and myconfig
After line "log-bin=mysql" Add line:
server-id=1

Once Youve got your issues sorted out, start all services
quickinstall -startall

📜 Scripts

Enroll a computer in AutoPilot semi-automatically
Coming Soon!
After MDT and AutoPilot enrollment completes, re-initialize the OOBE to trigger Windows back into a Fresh Start
Coming Soon!