Quantcast
Channel: Functions – PS Fab:\> Windows PowerShell scripts, functions, techniques, etc. IIS related… or not!
Browsing all 19 articles
Browse latest View live

UnZip

Unzip compressed files (without any external tool)

View Article



Add-SSLCertificate

Installs a .pfx file

View Article

BalloonTooltip

Displays a baloon tooltip with an informational message

View Article

Run-MySQLQuery

I’ve found this great function written by Thomas Maurer on his blog. It’s really usefull to automate MySQL queries.

View Article

Write-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 Article


Download file with progress

Download a file from the web and display progress (bytes and percentage)

View Article

Subnet 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 Article

Take 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 Article


PowerShell 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 Article


Let’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 Article

Check-MD5

Here’s a great function to generate the MD5 hash of a specified string.

View Article

SafeCopy

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 Article

Get-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 Article


Get-PSFab

Get-PSFab... or how-to automate the RSS reading of this blog! RSS Automation | RSS Feed reading | PS Fab:\> RSS Feed

View Article

Check-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 Article


Invoke-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 Article

Get-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 Article


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...

View Article

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 threshold (128kbps by default) function...

View Article
Browsing all 19 articles
Browse latest View live




Latest Images