YAW what!? No, I’m not trying to learn some Iroquoian language. That’s just the acronym of the useless script I just wrote …
Someone asked me recently how to convert a field value in a CSV file before to process the file with Log Parser. …
Somehow, I can be compared to a goldfish : my memory is really, really poor… And I do eat fish! But no, I can’t help…
Sometimes I wrote a usefull function that I embed in my profile and some weeks after (ok, even the very next day) I forget about it… So, here’s my solution: list these functions in a MOTD way. Each time I open a PowerShell console, the list is displayed and my memory gets refreshed.
Database mirroring is a solution for increasing the availability of a SQL Server database. Mirroring is implemented on a per-database basis and works only with databases that use the full recovery model.
Database mirroring setup is a pretty easy thing. The point here is not really to make a complicated process easier but to standadize the way we can set this up.
SQL Server PowerShell | Use the Database Engine cmdlets | Mirror-Database
Network Load Balancing (NLB) didn’t get a chance to have a new mmc to manage it in Windows 2008; we still have to use the old one inherited from Windows 2003. No way! Now we have a complete set of cmdlets, let’s use them.
Network Load Balancing cmdlets in Windows PowerShell | Create-NLBCluster
Sometimes, we have to create a (totally random named) temporary folder, do some stuff in it and then delete everything. Here’s the way
The best way of checking SQL Server backups is to restore them and run DBCC CHECKDB on the restored database. To do this regularly means that you need to automate the task. Allen White
That’s right. But it’s also a great example on how to work with MS SQL databases (connect, backup, restore, remote, SQLPS Module and more!)
Test Your SQL Server Backups with PowerShell | SQL Server Databases Backup | Challenge your Database – MS SQL (part. 1)
Tired of using ‘System.Net.WebClient’ as I am? Upgrade to PowerShell v3 and use Invoke-WebRequest instead!
My first application of Invoke-WebRequest is to create a broken links checker for my website. Choose a webpage URI to scan, it will get all the links in it, and make a hit for each one.
Check-BrokenLinks | HTTP Status codes | Monitor-Website
I like to find new needs to fill… Once again, I found one today on LinkedIn: Sambasiva Rao K. asked for some help on the “PowerShell Power Users” LinkedIn discussion group:
I have a requirement where i wanted to monitor the last modified time of a .MDB file and compare it with local system time and if it differences more than 1hour, i want my system to be restarted.
Based on Olaf Helper‘s work (http://social.technet.microsoft.com/wiki/contents/articles/900.how-to-sql-server-databases-backup-with-powershell-en-us.aspx), here’s the script to back up all non-system databases for SQL Server, with error handling and logging function.