Improving SQL Update/Insert performance

I was recently reviewing a Powershell script that had slow performance. The script used Get-MailboxFolderStatistics to pull information from an Exchange Server environment and insert (or update) a record in a SQL database based off the email address. The code was pretty simple…it ran a loop like the following for…

Get Regular Expression matches

Recently I was given a task at work…someone pointed at a haystack and asked me to find a needle. Actually, the task involved reading the body of hundreds of email messages looking for telephone numbers. Regular expressions and powershell make this pretty easy: ([regex]”[2-9]\d{2}-\d{3}-\d{4}”).Match(“Body with phone number like 345-555-6789 in…

Find upper range of AD attributes

The other day I was working on a powershell script to copy specific Active Directory attributes to a SQL database. I wanted to see if the destination SQL fields (which were varchar 100) would be able to contain the attributes, but I didn’t know the maximum lengths of the text…

Cisco UCS and Default Authentication Domains

I’ve recently been working with Cisco UCS — and more specifically the UCS Powertool (the powershell management component). Initially, my scripts were using a local account in UCSM for authentication. However, after changing the “Default Authentication Realm” from Local to LDAP (see screenshot below), I could no longer authenticate using…

© 2026 Enterprise Admins.org. Design inspired by the Clarity Design System. Not affiliated with or endorsed by Broadcom or VMware.