This code has been in my drafts box for 2 years. I figured I'd just go ahead and publish it, though I'm unsure of the context now. 1$dom = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain() 2$root = $dom.GetDirectoryEntry() 3$search = [System.DirectoryServices.DirectorySearcher]$root 4$search.Filter …
Read MoreSo I'm making the move to PowerShell. It's painful learning such alien (to me) concepts but books like Lee Holmes' PowerShell: The Definitive Guide help a ton. I was fortunate enough to be the editor for Chapters 1-5 and got a sneak preview. It's a fantastic book and can't wait to receive the title, complete with …
Read MoreWhen creating a new Active Directory user from the command line in PowerShell, you will likely find yourself using Read-Host's -AsSecureString switch when entering the password. 1$password = Read-Host "Enter password" -AsSecureString Next, you'll probably look around the Internets for a few hours or so trying …
Read MoreWhile researching for a paper I have to write in class about hierarchical data in relational databases, I was reading Joe Celko's book Trees and Hierarchies in SQL for Smarties. In the intro, he mentions a really useful website for validating SQL-92, SQL-99 and SQL-2003. The site is nice enough but could really benefit …
Read MoreLooking for the T-SQL (somewhat) equivalent to VBScript's FormatDateTime function? I've been too, for years. I finally found it within the CONVERT() function. As stated in SQL Server Books Online: In CONVERT ( data_type [ ( length ) ] , expression [ , style ] ), style is the style of the date format used to convert …
Read MoreFor my final project in my database class at USF, I chose to create a database for a small record label looking to sell albums online as well as provide artist bios, tour information and news. The database, which was scaled down version of a project I worked on in the past, looked something like this: The professor …
Read MoreSorry if you wrote via e-mail or left a comment in the past month or so and I didn't respond. I made a DNS change, broke stuff and consequently wasn't notified of any new comments or e-mails. I promise to respond when I get a chance. The DNS change also broke Akismet so I've gotta sift through about 2500 spams too.. …
Read MoreA friend showed me this and I've used it a few times since. Here's the easiest way to make a service auto start or stop after reboot: chkconfig servicename on to auto-start and chkconfig servicename off to stop auto-startup. Thanks, Lenny! Also, can anyone remind me what command I use to add regular user bins to root's …
Read MoreI'd like to start this post with a warning: I'm only 29 years old but already have permanent damage to my shoulder caused by overusage while working/playing on the computer. Two years ago, I had to claim workman's comp because I was disabled for a few weeks, barely being able to even stand because of an excruciating …
Read MoreUpdate: If you receive "access denied" when attempting to use msg, do the following: Terminal Services Configuration (tscc.msc) -> Open up the properties of the RDP-TCP connection object -> Permissions tab -> Advanced -> Edit the entry you are interested in changing. Thanks to TP at …
Read More