Currently browsing category

Scripts

Self-Destruct

Sometimes we need want to play secret agents, sometimes we just want to remove our trail. Remote execution is one thing and …

YAWPU

YAW what!? No, I’m not trying to learn some Iroquoian language. That’s just the acronym of the useless script I just wrote …

Convert value in CSV file

Someone asked me recently how to convert a field value in a CSV file before to process the file with Log Parser. …

Enhanced profile – Display my custom functions

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.

Check-PasswordExpiration

Because ‘Password never expires’ is a really bad option for an administrator…
For those who use their Active Directory account (the administrative one…) to connect to remote server roles through an MMC, this script can be very useful. Indeed, it allows you to be notified by email one week before the expiration of the password (by default, configurable).
Because if you do not connect directly to any server, you will never have the information about the expiration of your password, only a message stating that your account is restricted, but whitout telling you why.

Mirror-Database

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

Check-BrokenLinks

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

Scroll to Top