Category: Powershell

Configure static or dynamic IP and DNS with Powershell

I work in a lot of different offices and conference venues, in addition to my home office. At home, I need a static DNS server address; everywhere else, it has to be dynamic. Tired of the click-click-clickety-click it takes to set, unset, and reset my network adapter settings, I went looking for a Powershell solution. This is the […]

Use Powershell to find and punish – er, delete – rogue files

I like to know what’s on the drives that are supposed to be dedicated to data and log files. So I run a quick check of sys.master_files: SELECT LEFT(physical_name, 1) as Drive, SUM(size)*8/1024 as SizeMb FROM sys.master_files GROUP BY LEFT(physical_name, 1) ORDER BY Drive; And then I compare the numbers I got back against what Windows says. […]