Some times you want a quick report of the disk types and firmware versions with the number of disks on each version. Recently NetApp put out a billiton about older disk firmware failing more often that they should. I was given the task of making sure all our disks where OK. To archive that I…
Tag: function
Get info out of the Zerto analytic portal
This is a part of a script I have been using for about 2 years to pull basic data out of the Zerto analytic portal. I have really only just scratched the surface of what I can get. When I first wrote this all I needed was the number of green/yellow/red VPGs but there is…
Write to debug/log file function
Here is a function to save time when writing logging or debugging information in scripts. It has grown from a simple “dump stuff to a file” to a handy “Swiss army knife” of logging. The function is not perfect and will no doubt keep growing. A quick thing to mention is that if the file…
Snapshot Deletion script
This is a script I wrote to delete snapshots over a certian age wth an override. The override is in the name of the snapshot, so the snapshot can be deleted after x days or after a date. If the snapshot is named “my snapshot _ DeleteAfter60days” the script will look for “DeleteAfter” or “DA”…
Simple ACL functions
Here is a set of simple functions for basic management of directory permissions or Access Control Lists. when setting up file shares I tend to it in very few unique steps. Break inheritance while keeping ACLs, Add/Remove/Modify users or groups. So I have 4 powershell functions to simply complete these tasks. Put those functions at…
Tutorial Functions
Powershell, like just about every other programming/scripting language has functions. These functions can be simple one liners or very complicated, depending on your needs. A very simple function is show below. This function has a name and a code block. It has no input and will only output to the screen. Why should I use…
Menu Function
One (very boring) locked in Bank Holiday weekend, with my right hand in plaster I decided to write a function/s I had been meaning to write for a long time. A “simple” on screen menu. You give the function an array and it will display it and let you pick a row/element and return that…
MultiPing function
This is a function (3 functions) I have been meaning to write for a while. It is a Ping function that will ping more then one target and report what is responding, what is not and the time.To keep the display easy to read, if there is no state change then the last line is…
My Powershell Ping function
This is a nicer looking (than) Ping function I wrote in Powershell a while ago. It’s a simple Ping function that only writes a new line when there is a state change. So the output is much neater then a ping -t command that rapidly scrolls off the screen. The function will take the following…