Find 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 …
Here’s a function to find all folders containing mp3 files (listed if ‘-details’ switch is used) with a bit rate under the …
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.
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.
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! Let’s use it.
But…
The term ‘invoke-sqlcmd’ is not recognized as the name of a cmdlet, function, script file, or operable program.
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 version…
Check the PowerShell host version | Check compatibility
Get-PSFab… or how-to automate the RSS reading of this blog!
RSS Automation | RSS Feed reading | PS Fab:\> RSS Feed
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
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.
SafeCopy | Check-MD5 | BruteForceMD5
Here’s a great function to generate the MD5 hash of a specified string.
Have a break… No, no panda bears here! Sometimes, we want the user to aknowledge an information before the script continues. We …
Sometimes, we want to interact with the user who runned a script. The main purpose of this interaction is that the script …
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:
Since I have no memory (it’s actually this blog’s main purpose!), here is a summary of the possible subnet masks: Subnet Mask …
Thanks to Jason Niver on MSDN Blogs (Downloading files from the internet in PowerShell (with progress)), yep, we can download a file …
Here is a function to allow a script to log its execution. Output data into a log file. Options for path, extension …