Run-MySQLQuery
I’ve found this great function written by Thomas Maurer on his blog. It’s really usefull to automate MySQL queries.
View ArticleWrite-LogFile
Here is a function to allow a script to log its execution. Output data into a log file. Options for path, extension and overwrite.
View ArticleDownload file with progress
Download a file from the web and display progress (bytes and percentage)
View ArticleSubnet mask functions
Since I have no memory (it’s actually this blog’s main purpose!), here is a summary of the possible subnet masks: Subnet Mask Max Hosts Mathmatics Host bit length Mask octet Binary Mask Length Subnet...
View ArticleTake a screenshot with PowerShell
Thanks to Jeremy on StackOverflow (http://stackoverflow.com/questions/2969321/how-can-i-do-a-screen-capture-in-windows-powershell), .NET allows us to take a screenshot programatically:
View ArticlePowerShell Menus ($Host.UI.PromptForChoice) – Defined or… Dynamic!
Sometimes, we want to interact with the user who runned a script. The main purpose of this interaction is that the script can do different actions. Ok, if we know the list, we can use parameters...
View ArticleLet’s have a break
Have a break… No, no panda bears here! Sometimes, we want the user to aknowledge an information before the script continues. We don’t need him to choose something (like we saw yesterday with the...
View ArticleSafeCopy
A promise is a promise, here's my second (planned) application around MD5 hash: a function to copy files and check that the MD5 hash of the copied file is equal to the MD5 hash of the source file....
View ArticleGet-Uptime
Here's a simple function to get a "readable" value of the uptime for the local computer (by default, but there's a 'Server' parameter), and the last boot date/time. Get-UptimeDays | Get-Uptime
View ArticleGet-PSFab
Get-PSFab... or how-to automate the RSS reading of this blog! RSS Automation | RSS Feed reading | PS Fab:\> RSS Feed
View ArticleCheck-PSVersion
Q: How to be sure the script will run with the installed version of Powershell? A: Add a function to check the PowerShell host version at the begining of the script, and 'break' if it's not the right...
View ArticleInvoke-Sqlcmd
The Invoke-Sqlcmd cmdlet is a SQL Server cmdlet that runs scripts that contain statements from the languages (Transact-SQL and XQuery) and commands that are supported by the sqlcmd utility. Great!...
View ArticleGet-VMsByClusterNode
Here's a very simple but usefull function to have a view on which Virtual Machine is currently running (or not, there a State column!) on which node of a MSCS failover cluster.
View ArticleEnhanced 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...
View ArticleFind mp3 files with low Bit Rate
Here’s a function to find all folders containing mp3 files (listed if ‘-details’ switch is used) with a bit rate under the threshold (128kbps by default) function...
View Article
More Pages to Explore .....